summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeGenericSystem.cmake3
-rw-r--r--Modules/Platform/Generic.cmake4
2 files changed, 7 insertions, 0 deletions
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake
index 897969a..2af179d 100644
--- a/Modules/CMakeGenericSystem.cmake
+++ b/Modules/CMakeGenericSystem.cmake
@@ -19,6 +19,9 @@ SET(CMAKE_DL_LIBS "dl")
SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")
+# basically all general purpose OSs support shared libs
+SET(CMAKE_TARGET_SUPPORTS_ONLY_STATIC_LIBS FALSE)
+
SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
"If set, runtime paths are not added when using shared libraries.")
diff --git a/Modules/Platform/Generic.cmake b/Modules/Platform/Generic.cmake
index fdced24..9c78745 100644
--- a/Modules/Platform/Generic.cmake
+++ b/Modules/Platform/Generic.cmake
@@ -6,3 +6,7 @@
# about the platform. So everything has to be specified
# in the system/compiler files ${CMAKE_SYSTEM_NAME}-<compiler_basename>.cmake
# and/or ${CMAKE_SYSTEM_NAME}-<compiler_basename>-${CMAKE_SYSTEM_PROCESSOR}.cmake
+
+# (embedded) targets without operating system usually don't support shared libraries
+SET(CMAKE_TARGET_SUPPORTS_ONLY_STATIC_LIBS TRUE)
+