summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeGenericSystem.cmake22
-rw-r--r--Modules/Platform/gcc.cmake3
2 files changed, 10 insertions, 15 deletions
diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake
index 47c84fc..897969a 100644
--- a/Modules/CMakeGenericSystem.cmake
+++ b/Modules/CMakeGenericSystem.cmake
@@ -1,11 +1,3 @@
-SET(CMAKE_LINK_LIBRARY_SUFFIX "")
-
-SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
-SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
-SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
-SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
-SET(CMAKE_EXECUTABLE_SUFFIX "") # .exe
-SET(CMAKE_DL_LIBS "dl")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
@@ -15,12 +7,14 @@ SET(CMAKE_INCLUDE_FLAG_C "-I") # -I
SET(CMAKE_INCLUDE_FLAG_C_SEP "") # , or empty
SET(CMAKE_LIBRARY_PATH_FLAG "-L")
SET(CMAKE_LINK_LIBRARY_FLAG "-l")
-IF(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
-ENDIF(CMAKE_COMPILER_IS_GNUCC)
-IF(CMAKE_COMPILER_IS_GNUCXX)
- SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+
+SET(CMAKE_LINK_LIBRARY_SUFFIX "")
+SET(CMAKE_STATIC_LIBRARY_PREFIX "lib")
+SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
+SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
+SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
+SET(CMAKE_EXECUTABLE_SUFFIX "") # .exe
+SET(CMAKE_DL_LIBS "dl")
SET(CMAKE_FIND_LIBRARY_PREFIXES "lib")
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")
diff --git a/Modules/Platform/gcc.cmake b/Modules/Platform/gcc.cmake
index 6493c62..695a55f 100644
--- a/Modules/Platform/gcc.cmake
+++ b/Modules/Platform/gcc.cmake
@@ -1,4 +1,5 @@
IF(CMAKE_COMPILER_IS_GNUCC)
+ SET (CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
SET (CMAKE_C_FLAGS_INIT "")
SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
@@ -12,6 +13,7 @@ IF(CMAKE_COMPILER_IS_GNUCC)
ENDIF(CMAKE_COMPILER_IS_GNUCC)
IF(CMAKE_COMPILER_IS_GNUCXX)
+ SET (CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic
SET (CMAKE_CXX_FLAGS_INIT "")
SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g")
SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG")
@@ -23,4 +25,3 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
SET (CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
ENDIF(NOT APPLE)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-