[CMake Linux] Only include pthread and rt in target_link_libraries for ld.gold support (Alchemy sync)
Fixes CMake warnings on Linux
This commit is contained in:
@@ -10,7 +10,6 @@ if (DARWIN)
|
|||||||
find_library(CORESERVICES_LIBRARY CoreServices)
|
find_library(CORESERVICES_LIBRARY CoreServices)
|
||||||
endif (DARWIN)
|
endif (DARWIN)
|
||||||
|
|
||||||
|
|
||||||
set(LLCOMMON_INCLUDE_DIRS
|
set(LLCOMMON_INCLUDE_DIRS
|
||||||
${LIBS_OPEN_DIR}/cwdebug
|
${LIBS_OPEN_DIR}/cwdebug
|
||||||
${LIBS_OPEN_DIR}/llcommon
|
${LIBS_OPEN_DIR}/llcommon
|
||||||
@@ -19,14 +18,7 @@ set(LLCOMMON_INCLUDE_DIRS
|
|||||||
${Boost_INCLUDE_DIRS}
|
${Boost_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (LINUX)
|
|
||||||
# In order to support using ld.gold on linux, we need to explicitely
|
|
||||||
# specify all libraries that llcommon uses.
|
|
||||||
# llcommon uses `clock_gettime' which is provided by librt on linux.
|
|
||||||
set(LLCOMMON_LIBRARIES llcommon rt)
|
|
||||||
else (LINUX)
|
|
||||||
set(LLCOMMON_LIBRARIES llcommon)
|
set(LLCOMMON_LIBRARIES llcommon)
|
||||||
endif (LINUX)
|
|
||||||
|
|
||||||
set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a shared library.")
|
set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a shared library.")
|
||||||
if(LLCOMMON_LINK_SHARED)
|
if(LLCOMMON_LINK_SHARED)
|
||||||
|
|||||||
@@ -5,10 +5,4 @@ set(LLPLUGIN_INCLUDE_DIRS
|
|||||||
${LIBS_OPEN_DIR}/llplugin
|
${LIBS_OPEN_DIR}/llplugin
|
||||||
)
|
)
|
||||||
|
|
||||||
if (LINUX)
|
|
||||||
# In order to support using ld.gold on linux, we need to explicitely
|
|
||||||
# specify all libraries that llplugin uses.
|
|
||||||
set(LLPLUGIN_LIBRARIES llplugin pthread)
|
|
||||||
else (LINUX)
|
|
||||||
set(LLPLUGIN_LIBRARIES llplugin)
|
set(LLPLUGIN_LIBRARIES llplugin)
|
||||||
endif (LINUX)
|
|
||||||
|
|||||||
@@ -300,6 +300,7 @@ target_link_libraries(
|
|||||||
${Boost_SYSTEM_LIBRARY}
|
${Boost_SYSTEM_LIBRARY}
|
||||||
${CORESERVICES_LIBRARY}
|
${CORESERVICES_LIBRARY}
|
||||||
${URIPARSER_LIBRARY}
|
${URIPARSER_LIBRARY}
|
||||||
|
${RT_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (DARWIN)
|
if (DARWIN)
|
||||||
|
|||||||
@@ -227,6 +227,7 @@ target_link_libraries(
|
|||||||
${OPENSSL_LIBRARIES}
|
${OPENSSL_LIBRARIES}
|
||||||
${CRYPTO_LIBRARIES}
|
${CRYPTO_LIBRARIES}
|
||||||
${XMLRPCEPI_LIBRARIES}
|
${XMLRPCEPI_LIBRARIES}
|
||||||
|
${PTHREAD_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|
||||||
# tests
|
# tests
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ target_link_libraries(SLPlugin
|
|||||||
${LLCOMMON_LIBRARIES}
|
${LLCOMMON_LIBRARIES}
|
||||||
${APRUTIL_LIBRARIES}
|
${APRUTIL_LIBRARIES}
|
||||||
${PLUGIN_API_WINDOWS_LIBRARIES}
|
${PLUGIN_API_WINDOWS_LIBRARIES}
|
||||||
|
${PTHREAD_LIBRARY}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(SLPlugin
|
add_dependencies(SLPlugin
|
||||||
|
|||||||
Reference in New Issue
Block a user