cmake: support 2.8.7

Older versions of CMake support LINK_{PUBLIC,PRIVATE} while newer
versions prefer PUBLIC and PRIVATE instead, but still support the LINK_
prefix.
This commit is contained in:
Ben Boeckel 2014-10-24 14:48:14 -04:00
parent 464c2805e5
commit 7d708e4223
22 changed files with 28 additions and 28 deletions

View file

@ -28,7 +28,7 @@
# #
# Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers # Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
cmake_minimum_required(VERSION 2.8.6) cmake_minimum_required(VERSION 2.8.7)
project(bitmonero) project(bitmonero)

View file

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.8) cmake_minimum_required(VERSION 2.8.7)
project(unbound C) project(unbound C)
@ -163,18 +163,18 @@ add_library(unbound
${compat_src} ${compat_src}
${libunbound_src}) ${libunbound_src})
target_link_libraries(unbound target_link_libraries(unbound
PRIVATE LINK_PRIVATE
${OPENSSL_LIBRARIES} ${OPENSSL_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}) ${CMAKE_THREAD_LIBS_INIT})
if (LIBEVENT2_FOUND) if (LIBEVENT2_FOUND)
target_link_libraries(unbound target_link_libraries(unbound
PRIVATE LINK_PRIVATE
${LIBEVENT2_LIBRARIES}) ${LIBEVENT2_LIBRARIES})
endif () endif ()
if (WIN32) if (WIN32)
target_link_libraries(unbound target_link_libraries(unbound
PRIVATE LINK_PRIVATE
iphlpapi iphlpapi
ws2_32) ws2_32)
endif () endif ()

View file

@ -55,7 +55,7 @@ function (bitmonero_add_executable name)
add_executable("${name}" add_executable("${name}"
${ARGN}) ${ARGN})
target_link_libraries("${name}" target_link_libraries("${name}"
PRIVATE LINK_PRIVATE
${EXTRA_LIBRARIES}) ${EXTRA_LIBRARIES})
set_property(TARGET "${name}" set_property(TARGET "${name}"
PROPERTY PROPERTY

View file

@ -52,7 +52,7 @@ bitmonero_add_library(common
${common_headers} ${common_headers}
${common_private_headers}) ${common_private_headers})
target_link_libraries(common target_link_libraries(common
PRIVATE LINK_PRIVATE
crypto crypto
${UNBOUND_LIBRARY} ${UNBOUND_LIBRARY}
${Boost_DATE_TIME_LIBRARY} ${Boost_DATE_TIME_LIBRARY}

View file

@ -35,7 +35,7 @@ bitmonero_add_executable(connectivity_tool
${connectivity_tool_sources} ${connectivity_tool_sources}
${connectivity_tool_private_headers}) ${connectivity_tool_private_headers})
target_link_libraries(connectivity_tool target_link_libraries(connectivity_tool
PRIVATE LINK_PRIVATE
cryptonote_core cryptonote_core
crypto crypto
common common

View file

@ -67,13 +67,13 @@ bitmonero_add_library(cryptonote_core
${cryptonote_core_headers} ${cryptonote_core_headers}
${cryptonote_core_private_headers}) ${cryptonote_core_private_headers})
target_link_libraries(cryptonote_core target_link_libraries(cryptonote_core
PUBLIC LINK_PUBLIC
common common
crypto crypto
${Boost_DATE_TIME_LIBRARY} ${Boost_DATE_TIME_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY}
${Boost_SERIALIZATION_LIBRARY} ${Boost_SERIALIZATION_LIBRARY}
PRIVATE LINK_PRIVATE
${Boost_FILESYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY} ${Boost_THREAD_LIBRARY}

View file

@ -57,7 +57,7 @@ bitmonero_add_executable(daemon
${daemon_headers} ${daemon_headers}
${daemon_private_headers}) ${daemon_private_headers})
target_link_libraries(daemon target_link_libraries(daemon
PRIVATE LINK_PRIVATE
rpc rpc
cryptonote_core cryptonote_core
crypto crypto

View file

@ -43,7 +43,7 @@ bitmonero_add_executable(simpleminer
${simpleminer_headers} ${simpleminer_headers}
${simpleminer_private_headers}) ${simpleminer_private_headers})
target_link_libraries(simpleminer target_link_libraries(simpleminer
PRIVATE LINK_PRIVATE
cryptonote_core cryptonote_core
common common
${Boost_FILESYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}

View file

@ -48,5 +48,5 @@ bitmonero_add_library(mnemonics
${mnemonics_headers} ${mnemonics_headers}
${mnemonics_private_headers}) ${mnemonics_private_headers})
target_link_libraries(mnemonics target_link_libraries(mnemonics
PRIVATE LINK_PRIVATE
${Boost_SYSTEM_LIBRARY}) ${Boost_SYSTEM_LIBRARY})

View file

@ -43,7 +43,7 @@ bitmonero_add_library(rpc
${rpc_headers} ${rpc_headers}
${rpc_private_headers}) ${rpc_private_headers})
target_link_libraries(rpc target_link_libraries(rpc
PRIVATE LINK_PRIVATE
cryptonote_core cryptonote_core
${Boost_CHRONO_LIBRARY} ${Boost_CHRONO_LIBRARY}
${Boost_REGEX_LIBRARY} ${Boost_REGEX_LIBRARY}

View file

@ -43,7 +43,7 @@ bitmonero_add_executable(simplewallet
${simplewallet_headers} ${simplewallet_headers}
${simplewallet_private_headers}) ${simplewallet_private_headers})
target_link_libraries(simplewallet target_link_libraries(simplewallet
PRIVATE LINK_PRIVATE
wallet wallet
rpc rpc
cryptonote_core cryptonote_core

View file

@ -46,10 +46,10 @@ bitmonero_add_library(wallet
${wallet_headers} ${wallet_headers}
${wallet_private_headers}) ${wallet_private_headers})
target_link_libraries(wallet target_link_libraries(wallet
PUBLIC LINK_PUBLIC
cryptonote_core cryptonote_core
mnemonics mnemonics
PRIVATE LINK_PRIVATE
${Boost_SERIALIZATION_LIBRARY} ${Boost_SERIALIZATION_LIBRARY}
${Boost_SYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY} ${Boost_THREAD_LIBRARY}

View file

@ -75,7 +75,7 @@ add_executable(hash-target-tests
${hash_targets_sources} ${hash_targets_sources}
${hash_targets_headers}) ${hash_targets_headers})
target_link_libraries(hash-target-tests target_link_libraries(hash-target-tests
PRIVATE LINK_PRIVATE
cryptonote_core) cryptonote_core)
set_property(TARGET hash-target-tests set_property(TARGET hash-target-tests
PROPERTY PROPERTY

View file

@ -36,7 +36,7 @@ add_executable(core_proxy
${core_proxy_sources} ${core_proxy_sources}
${core_proxy_headers}) ${core_proxy_headers})
target_link_libraries(core_proxy target_link_libraries(core_proxy
PRIVATE LINK_PRIVATE
cryptonote_core cryptonote_core
${UPNP_LIBRARIES} ${UPNP_LIBRARIES}
${Boost_CHRONO_LIBRARY} ${Boost_CHRONO_LIBRARY}

View file

@ -58,7 +58,7 @@ add_executable(coretests
${core_tests_sources} ${core_tests_sources}
${core_tests_headers}) ${core_tests_headers})
target_link_libraries(coretests target_link_libraries(coretests
PRIVATE LINK_PRIVATE
cryptonote_core cryptonote_core
${Boost_FILESYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}

View file

@ -35,7 +35,7 @@ add_executable(transfers
${transfers_sources} ${transfers_sources}
${transfers_headers}) ${transfers_headers})
target_link_libraries(transfers target_link_libraries(transfers
PRIVATE LINK_PRIVATE
useragent useragent
rpc rpc
cryptonote_core cryptonote_core

View file

@ -35,7 +35,7 @@ add_executable(difficulty-tests
${difficulty_sources} ${difficulty_sources}
${difficulty_headers}) ${difficulty_headers})
target_link_libraries(difficulty-tests target_link_libraries(difficulty-tests
PRIVATE LINK_PRIVATE
cryptonote_core) cryptonote_core)
set_property(TARGET difficulty-tests set_property(TARGET difficulty-tests
PROPERTY PROPERTY

View file

@ -39,7 +39,7 @@ add_executable(functional_tests
${functional_tests_sources} ${functional_tests_sources}
${functional_tests_headers}) ${functional_tests_headers})
target_link_libraries(functional_tests target_link_libraries(functional_tests
PRIVATE LINK_PRIVATE
cryptonote_core cryptonote_core
wallet wallet
common common

View file

@ -35,7 +35,7 @@ add_executable(hash-tests
${hash_sources} ${hash_sources}
${hash_headers}) ${hash_headers})
target_link_libraries(hash-tests target_link_libraries(hash-tests
PRIVATE LINK_PRIVATE
crypto) crypto)
set_property(TARGET hash-tests set_property(TARGET hash-tests
PROPERTY PROPERTY

View file

@ -36,7 +36,7 @@ add_executable(net_load_tests_clt
${clt_sources} ${clt_sources}
${clt_headers}) ${clt_headers})
target_link_libraries(net_load_tests_clt target_link_libraries(net_load_tests_clt
PRIVATE LINK_PRIVATE
${GTEST_MAIN_LIBRARIES} ${GTEST_MAIN_LIBRARIES}
${Boost_CHRONO_LIBRARY} ${Boost_CHRONO_LIBRARY}
${Boost_DATE_TIME_LIBRARY} ${Boost_DATE_TIME_LIBRARY}
@ -55,7 +55,7 @@ add_executable(net_load_tests_srv
${srv_sources} ${srv_sources}
${srv_headers}) ${srv_headers})
target_link_libraries(net_load_tests_srv target_link_libraries(net_load_tests_srv
PRIVATE LINK_PRIVATE
${GTEST_MAIN_LIBRARIES} ${GTEST_MAIN_LIBRARIES}
${Boost_CHRONO_LIBRARY} ${Boost_CHRONO_LIBRARY}
${Boost_DATE_TIME_LIBRARY} ${Boost_DATE_TIME_LIBRARY}

View file

@ -48,7 +48,7 @@ add_executable(performance_tests
${performance_tests_sources} ${performance_tests_sources}
${performance_tests_headers}) ${performance_tests_headers})
target_link_libraries(performance_tests target_link_libraries(performance_tests
PRIVATE LINK_PRIVATE
cryptonote_core cryptonote_core
common common
crypto crypto

View file

@ -54,7 +54,7 @@ add_executable(unit_tests
${unit_tests_sources} ${unit_tests_sources}
${unit_tests_headers}) ${unit_tests_headers})
target_link_libraries(unit_tests target_link_libraries(unit_tests
PRIVATE LINK_PRIVATE
cryptonote_core cryptonote_core
rpc rpc
wallet wallet