Move libdl/libpthread handling to common_options
Setting -pthread makes linking libatomic manually unneeded
This commit is contained in:
parent
f2384057de
commit
10108ea237
14 changed files with 2 additions and 63 deletions
5
external/auto_updates/xz/CMakeLists.txt
vendored
5
external/auto_updates/xz/CMakeLists.txt
vendored
|
|
@ -24,9 +24,4 @@ else()
|
|||
INTERFACE
|
||||
lzma
|
||||
)
|
||||
|
||||
target_link_libraries(external_xz
|
||||
INTERFACE
|
||||
${CMAKE_DL_LIBS}
|
||||
)
|
||||
endif()
|
||||
|
|
|
|||
1
external/dispatch/CMakeLists.txt
vendored
1
external/dispatch/CMakeLists.txt
vendored
|
|
@ -61,7 +61,6 @@ INTERFACE
|
|||
target_link_libraries(external_dispatch_bundled
|
||||
INTERFACE
|
||||
${dispatch_binary_dir}/src/BlocksRuntime/libBlocksRuntime.a
|
||||
pthread
|
||||
)
|
||||
|
||||
target_link_libraries(external_dispatch
|
||||
|
|
|
|||
1
external/ffmpeg/CMakeLists.txt
vendored
1
external/ffmpeg/CMakeLists.txt
vendored
|
|
@ -57,7 +57,6 @@ else()
|
|||
target_link_libraries(external_ffmpeg
|
||||
INTERFACE
|
||||
X11
|
||||
pthread
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -32,9 +32,4 @@ else()
|
|||
PRIVATE
|
||||
${X11_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
target_link_libraries(external_hime_im_client
|
||||
PRIVATE
|
||||
${CMAKE_DL_LIBS}
|
||||
)
|
||||
endif()
|
||||
|
|
|
|||
6
external/jemalloc/CMakeLists.txt
vendored
6
external/jemalloc/CMakeLists.txt
vendored
|
|
@ -51,12 +51,6 @@ INTERFACE
|
|||
${SOURCE_DIR}/include
|
||||
)
|
||||
|
||||
target_link_libraries(external_jemalloc_bundled
|
||||
INTERFACE
|
||||
${CMAKE_DL_LIBS}
|
||||
pthread
|
||||
)
|
||||
|
||||
add_dependencies(external_jemalloc_bundled jemalloc-build)
|
||||
|
||||
target_link_libraries(external_jemalloc
|
||||
|
|
|
|||
1
external/nimf_qt5/CMakeLists.txt
vendored
1
external/nimf_qt5/CMakeLists.txt
vendored
|
|
@ -45,6 +45,5 @@ else()
|
|||
target_link_libraries(external_nimf_qt5
|
||||
PRIVATE
|
||||
desktop-app::external_qt
|
||||
${CMAKE_DL_LIBS}
|
||||
)
|
||||
endif()
|
||||
|
|
|
|||
5
external/openal/CMakeLists.txt
vendored
5
external/openal/CMakeLists.txt
vendored
|
|
@ -47,11 +47,6 @@ else()
|
|||
INTERFACE
|
||||
openal
|
||||
)
|
||||
target_link_libraries(external_openal
|
||||
INTERFACE
|
||||
${CMAKE_DL_LIBS}
|
||||
pthread
|
||||
)
|
||||
endif()
|
||||
|
||||
if (NOT DESKTOP_APP_USE_PACKAGED)
|
||||
|
|
|
|||
|
|
@ -19,12 +19,4 @@ if (NOT DESKTOP_APP_USE_PACKAGED)
|
|||
${libs_loc}/openssl/include
|
||||
)
|
||||
endif()
|
||||
|
||||
if (LINUX)
|
||||
target_link_libraries(external_openssl_common
|
||||
INTERFACE
|
||||
${CMAKE_DL_LIBS}
|
||||
pthread
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
2
external/qt/CMakeLists.txt
vendored
2
external/qt/CMakeLists.txt
vendored
|
|
@ -305,8 +305,6 @@ else()
|
|||
xcb
|
||||
X11
|
||||
X11-xcb
|
||||
${CMAKE_DL_LIBS}
|
||||
pthread
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
2
external/qt/qt6/CMakeLists.txt
vendored
2
external/qt/qt6/CMakeLists.txt
vendored
|
|
@ -280,8 +280,6 @@ else()
|
|||
xcb
|
||||
X11
|
||||
X11-xcb
|
||||
${CMAKE_DL_LIBS}
|
||||
pthread
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
7
external/rlottie/CMakeLists.txt
vendored
7
external/rlottie/CMakeLists.txt
vendored
|
|
@ -133,13 +133,6 @@ else()
|
|||
${rlottie_loc}/src/vector/freetype
|
||||
)
|
||||
|
||||
if (LINUX)
|
||||
target_link_libraries(external_rlottie_bundled
|
||||
PRIVATE
|
||||
pthread
|
||||
)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
target_compile_options(external_rlottie_bundled
|
||||
PRIVATE
|
||||
|
|
|
|||
|
|
@ -16,5 +16,4 @@ PRIVATE
|
|||
target_link_libraries(linux_wayland_helper
|
||||
PUBLIC
|
||||
desktop-app::external_gsl
|
||||
${CMAKE_DL_LIBS}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -12,8 +12,3 @@ nice_target_sources(linux_xcb_helper ${CMAKE_CURRENT_SOURCE_DIR}
|
|||
PRIVATE
|
||||
linux_xcb_helper.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(linux_xcb_helper
|
||||
PUBLIC
|
||||
${CMAKE_DL_LIBS}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ INTERFACE
|
|||
target_link_options(common_options
|
||||
INTERFACE
|
||||
-Wl,--as-needed
|
||||
-pthread
|
||||
)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
|
|
@ -64,6 +65,7 @@ endif()
|
|||
target_link_libraries(common_options
|
||||
INTERFACE
|
||||
desktop-app::external_jemalloc
|
||||
${CMAKE_DL_LIBS}
|
||||
)
|
||||
|
||||
if (DESKTOP_APP_USE_ALLOCATION_TRACER)
|
||||
|
|
@ -109,7 +111,6 @@ if (NOT DESKTOP_APP_USE_PACKAGED)
|
|||
endif()
|
||||
target_link_options(common_options
|
||||
INTERFACE
|
||||
-pthread
|
||||
-rdynamic
|
||||
-fwhole-program
|
||||
-Wl,-z,relro
|
||||
|
|
@ -117,16 +118,3 @@ if (NOT DESKTOP_APP_USE_PACKAGED)
|
|||
# -pie # https://gitlab.gnome.org/GNOME/nautilus/-/issues/1601
|
||||
)
|
||||
endif()
|
||||
|
||||
if (DESKTOP_APP_USE_PACKAGED)
|
||||
find_library(ATOMIC_LIBRARY atomic)
|
||||
else()
|
||||
find_library(ATOMIC_LIBRARY libatomic.a)
|
||||
endif()
|
||||
|
||||
if (ATOMIC_LIBRARY)
|
||||
target_link_libraries(common_options
|
||||
INTERFACE
|
||||
${ATOMIC_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue