diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2025-04-03 11:23:57 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2025-04-03 11:23:57 +0200 |
| commit | 71caca84d92161792861fb33381f7a9c2be05343 (patch) | |
| tree | 0a9bd0ef23ba4051af4070dba1afcf87111ec7b6 /CMake | |
| parent | 07bb343de7c6b4152a7eb8940da99d5d006f27cd (diff) | |
| parent | 678c85027294c0ae5162d02b20a59fde758ac77a (diff) | |
Merge remote-tracking branch 'refs/remotes/origin/master'
Diffstat (limited to 'CMake')
| -rw-r--r-- | CMake/fl_debug_var.cmake | 18 | ||||
| -rw-r--r-- | CMake/options.cmake | 4 |
2 files changed, 13 insertions, 9 deletions
diff --git a/CMake/fl_debug_var.cmake b/CMake/fl_debug_var.cmake index 815e97dc1..d583d7d0c 100644 --- a/CMake/fl_debug_var.cmake +++ b/CMake/fl_debug_var.cmake @@ -117,16 +117,20 @@ function(fl_debug_target name) ### INTERFACE_LOCATION) ### endif() - list(APPEND _props + if(NOT _type STREQUAL "INTERFACE_LIBRARY" OR CMAKE_VERSION VERSION_GREATER_EQUAL "3.19") + # Before 3.19: "INTERFACE_LIBRARY targets may only have whitelisted properties" + list(APPEND _props INCLUDE_DIRECTORIES LINK_DIRECTORIES LINK_LIBRARIES - COMPILE_DEFINITIONS - INTERFACE_COMPILE_DEFINITIONS - INTERFACE_COMPILE_FEATURES - INTERFACE_INCLUDE_DIRECTORIES - INTERFACE_LINK_DIRECTORIES - INTERFACE_LINK_LIBRARIES) + COMPILE_DEFINITIONS) + endif() + + list(APPEND _props + INTERFACE_COMPILE_DEFINITIONS + INTERFACE_INCLUDE_DIRECTORIES + INTERFACE_LINK_DIRECTORIES + INTERFACE_LINK_LIBRARIES) foreach(prop ${_props}) get_target_property(${prop} ${name} ${prop}) diff --git a/CMake/options.cmake b/CMake/options.cmake index d2fa392f7..8411b92ec 100644 --- a/CMake/options.cmake +++ b/CMake/options.cmake @@ -739,11 +739,11 @@ if(FLTK_USE_PTHREADS) include(FindThreads) - if(CMAKE_HAVE_THREADS_LIBRARY) + if(Threads_FOUND) add_definitions("-D_THREAD_SAFE -D_REENTRANT") set(USE_THREADS 1) set(FLTK_THREADS_FOUND TRUE) - endif(CMAKE_HAVE_THREADS_LIBRARY) + endif(Threads_FOUND) if(CMAKE_USE_PTHREADS_INIT AND NOT WIN32) set(HAVE_PTHREAD 1) |
