Browse Source

Merge pull request #56 from subtly/develop

update for osx builds
cl-refactor
Gav Wood 11 years ago
parent
commit
ccd58f9e92
  1. 4
      alethzero/CMakeLists.txt
  2. 14
      libethereum/CMakeLists.txt

4
alethzero/CMakeLists.txt

@ -29,7 +29,7 @@ qt5_wrap_ui(ui_Main.h Main.ui)
# Set name of binary and add_executable()
if (APPLE)
set(EXECUTEABLE AlethZero)
# set(CMAKE_INSTALL_PREFIX ./)
set(CMAKE_INSTALL_PREFIX ./)
set(BIN_INSTALL_DIR ".")
set(DOC_INSTALL_DIR ".")
@ -53,7 +53,6 @@ qt5_use_modules(${EXECUTEABLE} Core Gui Widgets Network)
target_link_libraries(${EXECUTEABLE} ethereum secp256k1 ${CRYPTOPP_LIBRARIES})
if (APPLE)
# target_link_libraries(${EXECUTEABLE} boost_system boost_filesystem gmp leveldb miniupnpc snappy)
set_target_properties(${EXECUTEABLE} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/EthereumMacOSXBundleInfo.plist.in")
SET_SOURCE_FILES_PROPERTIES(${EXECUTEABLE} PROPERTIES MACOSX_PACKAGE_LOCATION MacOS)
@ -71,6 +70,7 @@ if (APPLE)
set(APPS ${binary_build_dir}/${EXECUTEABLE}.app)
# This tool and the next will automatically looked at the linked libraries in order to determine what dependencies are required. Thus, target_link_libaries only needs to add ethereum and secp256k1 (above)
install(CODE "
include(BundleUtilities)
set(BU_CHMOD_BUNDLE_ITEMS 1)

14
libethereum/CMakeLists.txt

@ -31,11 +31,19 @@ if(${TARGET_PLATFORM} STREQUAL "w64")
target_link_libraries(ethereum ws2_32)
target_link_libraries(ethereum mswsock)
target_link_libraries(ethereum shlwapi)
elseif (APPLE)
# Latest mavericks boost libraries only come with -mt
target_link_libraries(ethereum ${CRYPTOPP_LIBRARIES})
target_link_libraries(ethereum boost_system-mt)
target_link_libraries(ethereum boost_filesystem-mt)
target_link_libraries(ethereum boost_thread-mt)
find_package(Threads REQUIRED)
target_link_libraries(ethereum ${CMAKE_THREAD_LIBS_INIT})
else ()
target_link_libraries(ethereum ${CRYPTOPP_LIBRARIES})
target_link_libraries(ethereum boost_system)
target_link_libraries(ethereum boost_filesystem)
target_link_libraries(ethereum boost_thread)
target_link_libraries(ethereum boost_system-mt)
target_link_libraries(ethereum boost_filesystem-mt)
target_link_libraries(ethereum boost_thread-mt)
find_package(Threads REQUIRED)
target_link_libraries(ethereum ${CMAKE_THREAD_LIBS_INIT})
endif ()

Loading…
Cancel
Save