From 0579b12b568a33f32d13b7593bf68cdff8eaae1d Mon Sep 17 00:00:00 2001 From: Eric Frias Date: Tue, 17 Jun 2014 10:05:46 -0400 Subject: [PATCH] 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 )