nixpkgs-suyu/pkgs/development/compilers/solc/patches/shared-libs-install.patch
mingchuan 5095e9e32e solc: 0.4.23 -> 0.4.24 (#41631)
Also enable test
2018-06-10 10:37:58 +02:00

64 lines
2.5 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c05208f..8893648e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,6 +48,20 @@ add_subdirectory(libevmasm)
add_subdirectory(libsolidity)
add_subdirectory(libsolc)
+
+install(DIRECTORY libdevcore/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libdevcore
+ FILES_MATCHING PATTERN "*.h")
+install(DIRECTORY libevmasm/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libevmasm
+ FILES_MATCHING PATTERN "*.h")
+install(DIRECTORY libsolidity/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libsolidity
+ FILES_MATCHING PATTERN "*.h")
+install(DIRECTORY liblll/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/liblll
+ FILES_MATCHING PATTERN "*.h")
+
if (NOT EMSCRIPTEN)
add_subdirectory(solc)
add_subdirectory(liblll)
diff --git a/libdevcore/CMakeLists.txt b/libdevcore/CMakeLists.txt
index fa7e3f48..1f9f52b4 100644
--- a/libdevcore/CMakeLists.txt
+++ b/libdevcore/CMakeLists.txt
@@ -6,3 +6,4 @@ target_link_libraries(devcore PRIVATE jsoncpp ${Boost_FILESYSTEM_LIBRARIES} ${Bo
target_include_directories(devcore PUBLIC "${CMAKE_SOURCE_DIR}")
target_include_directories(devcore SYSTEM PUBLIC ${Boost_INCLUDE_DIRS})
add_dependencies(devcore solidity_BuildInfo.h)
+install(TARGETS devcore LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/libevmasm/CMakeLists.txt b/libevmasm/CMakeLists.txt
index 86192c1b..e7f15e93 100644
--- a/libevmasm/CMakeLists.txt
+++ b/libevmasm/CMakeLists.txt
@@ -3,3 +3,4 @@ file(GLOB headers "*.h")
add_library(evmasm ${sources} ${headers})
target_link_libraries(evmasm PUBLIC devcore)
+install(TARGETS evmasm LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/liblll/CMakeLists.txt b/liblll/CMakeLists.txt
index 4cdc073a..b61f03c7 100644
--- a/liblll/CMakeLists.txt
+++ b/liblll/CMakeLists.txt
@@ -3,3 +3,4 @@ file(GLOB headers "*.h")
add_library(lll ${sources} ${headers})
target_link_libraries(lll PUBLIC evmasm devcore)
+install(TARGETS lll LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/libsolidity/CMakeLists.txt b/libsolidity/CMakeLists.txt
index 0bdec4b4..e876177e 100644
--- a/libsolidity/CMakeLists.txt
+++ b/libsolidity/CMakeLists.txt
@@ -29,6 +29,7 @@ endif()
add_library(solidity ${sources} ${headers})
target_link_libraries(solidity PUBLIC evmasm devcore ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
+install(TARGETS solidity LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
if (${Z3_FOUND})
target_link_libraries(solidity PUBLIC ${Z3_LIBRARY})