From 32adf87f92f85c53bb75b78248951e639709b54c Mon Sep 17 00:00:00 2001 From: subtly Date: Thu, 7 May 2015 02:23:28 +0200 Subject: [PATCH] Fix macos builds following changes from #1809. --- abi/CMakeLists.txt | 6 +++++- cmake/EthExecutableHelper.cmake | 1 + eth/CMakeLists.txt | 6 +++++- ethminer/CMakeLists.txt | 7 ++++++- rlp/CMakeLists.txt | 7 ++++++- solc/CMakeLists.txt | 6 +++++- 6 files changed, 28 insertions(+), 5 deletions(-) diff --git a/abi/CMakeLists.txt b/abi/CMakeLists.txt index 47c581b5b..3cc6b2594 100644 --- a/abi/CMakeLists.txt +++ b/abi/CMakeLists.txt @@ -12,4 +12,8 @@ add_executable(${EXECUTABLE} ${SRC_LIST}) target_link_libraries(${EXECUTABLE} ethereum) -eth_install_executable(${EXECUTABLE}) +if (APPLE) + install(TARGETS ${EXECUTABLE} DESTINATION bin) +else() + eth_install_executable(${EXECUTABLE}) +endif() diff --git a/cmake/EthExecutableHelper.cmake b/cmake/EthExecutableHelper.cmake index 5908f6ff4..1d1cb887b 100644 --- a/cmake/EthExecutableHelper.cmake +++ b/cmake/EthExecutableHelper.cmake @@ -94,6 +94,7 @@ macro(eth_install_executable EXECUTABLE) # This tool and next will inspect linked libraries in order to determine which dependencies are required if (${CMAKE_CFG_INTDIR} STREQUAL ".") + # TODO: This should only happen for GUI application set(APP_BUNDLE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE}.app") else () set(APP_BUNDLE_PATH "${CMAKE_CURRENT_BINARY_DIR}/\$ENV{CONFIGURATION}/${EXECUTABLE}.app") diff --git a/eth/CMakeLists.txt b/eth/CMakeLists.txt index 06c0c9989..0e56eb9f5 100644 --- a/eth/CMakeLists.txt +++ b/eth/CMakeLists.txt @@ -37,4 +37,8 @@ if (DEFINED WIN32 AND NOT DEFINED CMAKE_COMPILER_IS_MINGW) eth_copy_dlls("${EXECUTABLE}" MHD_DLLS) endif() -eth_install_executable(${EXECUTABLE}) +if (APPLE) + install(TARGETS ${EXECUTABLE} DESTINATION bin) +else() + eth_install_executable(${EXECUTABLE}) +endif() diff --git a/ethminer/CMakeLists.txt b/ethminer/CMakeLists.txt index 7467578fc..af38c0c84 100644 --- a/ethminer/CMakeLists.txt +++ b/ethminer/CMakeLists.txt @@ -37,4 +37,9 @@ if (DEFINED WIN32 AND NOT DEFINED CMAKE_COMPILER_IS_MINGW) eth_copy_dlls("${EXECUTABLE}" MHD_DLLS) endif() -eth_install_executable(${EXECUTABLE}) +if (APPLE) + install(TARGETS ${EXECUTABLE} DESTINATION bin) +else() + eth_install_executable(${EXECUTABLE}) +endif() + diff --git a/rlp/CMakeLists.txt b/rlp/CMakeLists.txt index 247804dbc..92d0c7978 100644 --- a/rlp/CMakeLists.txt +++ b/rlp/CMakeLists.txt @@ -12,4 +12,9 @@ add_executable(${EXECUTABLE} ${SRC_LIST}) target_link_libraries(${EXECUTABLE} devcrypto) -eth_install_executable(${EXECUTABLE}) +if (APPLE) + install(TARGETS ${EXECUTABLE} DESTINATION bin) +else() + eth_install_executable(${EXECUTABLE}) +endif() + diff --git a/solc/CMakeLists.txt b/solc/CMakeLists.txt index 14e95a4e7..e60d3c8cf 100644 --- a/solc/CMakeLists.txt +++ b/solc/CMakeLists.txt @@ -17,7 +17,11 @@ target_link_libraries(${EXECUTABLE} ${Boost_FILESYSTEM_LIBRARIES}) target_link_libraries(${EXECUTABLE} ${Boost_PROGRAM_OPTIONS_LIBRARIES}) target_link_libraries(${EXECUTABLE} solidity) -eth_install_executable(${EXECUTABLE}) +if (APPLE) + install(TARGETS ${EXECUTABLE} DESTINATION bin) +else() + eth_install_executable(${EXECUTABLE}) +endif() add_library(soljson jsonCompiler.cpp ${HEADERS}) target_link_libraries(soljson solidity)