summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--cmake/opentrack-boilerplate.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake
index 9f6e605b..7a88e6ef 100644
--- a/cmake/opentrack-boilerplate.cmake
+++ b/cmake/opentrack-boilerplate.cmake
@@ -84,9 +84,11 @@ function(otr_compat target)
set(c-props)
set(l-props)
+ get_property(linker-lang TARGET ${target} PROPERTY LINKER_LANGUAGE)
+
if(CMAKE_COMPILER_IS_GNUCXX)
set(c-props "-fvisibility=hidden")
- if(NOT is-c-only)
+ if(NOT linker-lang STREQUAL "C")
set(c-props "${c-props} -fuse-cxa-atexit")
endif()
endif()