Browse Source

fixed Ubuntu12.04 compile error

cl-refactor
Jeffrey Lee 11 years ago
parent
commit
fb67642855
  1. 3
      alethzero/CMakeLists.txt
  2. 2
      eth/CMakeLists.txt
  3. 12
      libethereum/CMakeLists.txt
  4. 2
      test/CMakeLists.txt
  5. 3
      walleth/CMakeLists.txt

3
alethzero/CMakeLists.txt

@ -20,6 +20,8 @@ if (APPLE)
include_directories(/usr/local/opt/qt5/include /usr/local/include) include_directories(/usr/local/opt/qt5/include /usr/local/include)
elseif (${TARGET_PLATFORM} STREQUAL "w64") elseif (${TARGET_PLATFORM} STREQUAL "w64")
set(SRC_LIST ${SRC_LIST} ../windows/qt_plugin_import.cpp) set(SRC_LIST ${SRC_LIST} ../windows/qt_plugin_import.cpp)
elseif (UNIX)
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ";$ENV{QTDIR}/lib/cmake")
endif () endif ()
@ -95,6 +97,7 @@ elseif (${TARGET_PLATFORM} STREQUAL "w64")
target_link_libraries(${EXECUTEABLE} crypt32) target_link_libraries(${EXECUTEABLE} crypt32)
target_link_libraries(${EXECUTEABLE} Qt5PlatformSupport) target_link_libraries(${EXECUTEABLE} Qt5PlatformSupport)
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
elseif (UNIX)
else () else ()
target_link_libraries(${EXECUTEABLE} boost_system) target_link_libraries(${EXECUTEABLE} boost_system)
target_link_libraries(${EXECUTEABLE} boost_filesystem) target_link_libraries(${EXECUTEABLE} boost_filesystem)

2
eth/CMakeLists.txt

@ -20,6 +20,8 @@ if (${TARGET_PLATFORM} STREQUAL "w64")
target_link_libraries(eth boost_filesystem-mt-s) target_link_libraries(eth boost_filesystem-mt-s)
target_link_libraries(eth boost_thread_win32-mt-s) target_link_libraries(eth boost_thread_win32-mt-s)
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
elseif (UNIX)
else () else ()
target_link_libraries(eth ${CRYPTOPP_LIBRARIES}) target_link_libraries(eth ${CRYPTOPP_LIBRARIES})
target_link_libraries(eth boost_system) target_link_libraries(eth boost_system)

12
libethereum/CMakeLists.txt

@ -10,7 +10,9 @@ if(APPLE)
else() else()
add_library(ethereum ${SRC_LIST}) add_library(ethereum ${SRC_LIST})
endif() endif()
if (UNIX)
FIND_PACKAGE(Boost 1.53 REQUIRED COMPONENTS thread date_time system filesystem program_options signals serialization chrono unit_test_framework locale)
endif()
file(GLOB HEADERS "*.h") file(GLOB HEADERS "*.h")
include_directories(../secp256k1) include_directories(../secp256k1)
@ -39,6 +41,14 @@ elseif (APPLE)
target_link_libraries(ethereum boost_thread-mt) target_link_libraries(ethereum boost_thread-mt)
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
target_link_libraries(ethereum ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries(ethereum ${CMAKE_THREAD_LIBS_INIT})
elseif (UNIX)
target_link_libraries(ethereum ${CRYPTOPP_LIBRARIES})
target_link_libraries(ethereum ${Boost_SYSTEM_LIBRARY})
target_link_libraries(ethereum ${Boost_FILESYSTEM_LIBRARY})
target_link_libraries(ethereum ${Boost_THREAD_LIBRARY})
target_link_libraries(ethereum ${Boost_DATE_TIME_LIBRARY})
target_link_libraries(ethereum leveldb)
target_link_libraries(ethereum snappy)
else () else ()
target_link_libraries(ethereum ${CRYPTOPP_LIBRARIES}) target_link_libraries(ethereum ${CRYPTOPP_LIBRARIES})
target_link_libraries(ethereum boost_system) target_link_libraries(ethereum boost_system)

2
test/CMakeLists.txt

@ -21,6 +21,8 @@ if (${TARGET_PLATFORM} STREQUAL "w64")
target_link_libraries(testeth boost_filesystem-mt-s) target_link_libraries(testeth boost_filesystem-mt-s)
target_link_libraries(testeth boost_thread_win32-mt-s) target_link_libraries(testeth boost_thread_win32-mt-s)
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
elseif (UNIX)
else () else ()
target_link_libraries(testeth ${CRYPTOPP_LIBRARIES}) target_link_libraries(testeth ${CRYPTOPP_LIBRARIES})
target_link_libraries(testeth boost_system) target_link_libraries(testeth boost_system)

3
walleth/CMakeLists.txt

@ -20,6 +20,8 @@ if (APPLE)
include_directories(/usr/local/opt/qt5/include /usr/local/include) include_directories(/usr/local/opt/qt5/include /usr/local/include)
elseif (${TARGET_PLATFORM} STREQUAL "w64") elseif (${TARGET_PLATFORM} STREQUAL "w64")
set(SRC_LIST ${SRC_LIST} ../windows/qt_plugin_import.cpp) set(SRC_LIST ${SRC_LIST} ../windows/qt_plugin_import.cpp)
elseif (UNIX)
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ";$ENV{QTDIR}/lib/cmake")
endif () endif ()
@ -102,6 +104,7 @@ elseif (${TARGET_PLATFORM} STREQUAL "w64")
target_link_libraries(${EXECUTEABLE} boost_thread_win32-mt-s) target_link_libraries(${EXECUTEABLE} boost_thread_win32-mt-s)
target_link_libraries(${EXECUTEABLE} Qt5PlatformSupport) target_link_libraries(${EXECUTEABLE} Qt5PlatformSupport)
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
elseif (UNIX)
else () else ()
target_link_libraries(${EXECUTEABLE} boost_system) target_link_libraries(${EXECUTEABLE} boost_system)
target_link_libraries(${EXECUTEABLE} boost_filesystem) target_link_libraries(${EXECUTEABLE} boost_filesystem)

Loading…
Cancel
Save