From 0579b12b568a33f32d13b7593bf68cdff8eaae1d Mon Sep 17 00:00:00 2001 From: Eric Frias Date: Tue, 17 Jun 2014 10:05:46 -0400 Subject: [PATCH 1/2] Changes to make libraries that use FC automatically get the right dependent libraries --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e69cb66..cefb7c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,6 +55,10 @@ IF( WIN32 ) LIST(APPEND BOOST_COMPONENTS coroutine) SET(Boost_LIBRARIES ${BOOST_LIBRARIES_TEMP} ${Boost_LIBRARIES}) ENDIF() + + set( PLATFORM_SPECIFIC_LIBS WS2_32.lib ) + # iphlpapi.lib + ELSE(WIN32) MESSAGE(STATUS "Configuring fc to build on Unix/Apple") @@ -213,7 +217,7 @@ target_include_directories(fc ${CMAKE_CURRENT_SOURCE_DIR}/vendor/easylzma/src ) -target_link_libraries( fc PUBLIC easylzma_static ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} ${CMAKE_DL_LIBS} ${rt_library}) +target_link_libraries( fc PUBLIC easylzma_static ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} ${PLATFORM_SPECIFIC_LIBS} ${RPCRT4} ${CMAKE_DL_LIBS} ${rt_library}) add_executable( ntp_test ntp_test.cpp ) target_link_libraries( ntp_test fc ) From f6eb41329a73dd34004f801972058a82f6d6da5b Mon Sep 17 00:00:00 2001 From: Eric Frias Date: Tue, 17 Jun 2014 10:58:57 -0400 Subject: [PATCH 2/2] Fix unix build --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cefb7c9..c9b0bec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,11 +77,11 @@ ELSE(WIN32) ENDIF(NOT APPLE) ENDIF(WIN32) -#IF($ENV{OPENSSL_ROOT_DIR}) +IF($ENV{OPENSSL_ROOT_DIR}) set(OPENSSL_ROOT_DIR $ENV{OPENSSL_ROOT_DIR} ) set(OPENSSL_INCLUDE_DIR ${OPENSSL_ROOT_DIR}/include) message(STATUS "Setting up OpenSSL root and include vars to ${OPENSSL_ROOT_DIR}, ${OPENSSL_INCLUDE_DIR}") -#ENDIF() +ENDIF() find_package(OpenSSL)