Commit 0692323f authored by Bill Hoffman's avatar Bill Hoffman
Browse files

*** empty log message ***

parent 0e8052b1
......@@ -3,3 +3,9 @@
# loading this file to force a compiler.
FIND_PROGRAM(CMAKE_C_COMPILER NAMES $ENV{CC} gcc cc cl bcc PATHS /bin /usr/bin /usr/local/bin )
# to check for is gnu we need to compile this:
# #ifdef __GNUC__
# yes;
# #endif
......@@ -8,11 +8,25 @@
# 1. set default values that will work for most system
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
"${CMAKE_CXX_COMPILE} ${CMAKE_SHARED_LIBRARY_CREATE_FLAGS} ${CMAKE_CXX_LINK_SHARED_OUT_FLAG} <TARGET> <OBJECTS>")
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "") # -pic
# for gnu compiler always
SET(CMAKE_SHARED_LIBRARY_CREATE_FLAGS "") # -shared
SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so
SET(CMAKE_SHARED_LIBRARY_LINK_FLAGS "") # +s, or some flag that an exe needs to use a shared lib
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG "") # -rpath
SET(CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP "") # : or empty
SET(CMAKE_CXX_CREATE_AR_LIBRARY
"${CMAKE_AR} ${CMAKE_AR_FLAGS} <TARGET> <OBJECTS>")
IF(CMAKE_COMPILER_IS_GNUGXX)
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic
ENDIF(CMAKE_COMPILER_IS_GNUGXX)
SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL
"If set, runtime paths are not added when using shared libraries.")
# 2. now include SystemName.cmake file to set the system specific information
SET(CMAKE_SYSTEM_INFO_FILE ${CMAKE_ROOT}/Modules/${CMAKE_SYSTEM_NAME}.cmake)
......@@ -25,6 +39,29 @@ ELSE(EXISTS ${CMAKE_SYSTEM_INFO_FILE})
ENDIF(EXISTS ${CMAKE_SYSTEM_INFO_FILE})
# Set up default values for things that have not been set either
# in SYSTEM.cmake or SYSTEM-compiler.cmake
IF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY
"${CMAKE_CXX_COMPILE} ${CMAKE_SHARED_LIBRARY_CREATE_FLAGS} "
"${CMAKE_CXX_LINK_SHARED_OUT_FLAG} <TARGET> <OBJECTS>")
ENDIF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
IF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY)
SET(CMAKE_CXX_CREATE_STATIC_LIBRARY
"${CMAKE_CXX_AR} ${CMAKE_AR_FLAGS} <TARGET> <OBJECTS>")
ENDIF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY)
IF(NOT CMAKE_CXX_COMPILE)
SET(CMAKE_CXX_COMPILE
"${CMAKE_CXX_COMPILER} -o <OBJECT> ${CMAKE_CXX_FLAGS} -c <SOURCE>")
ENDIF(NOT CMAKE_CXX_COMPILE)
# 3. include optional systemname-compiler.cmake files
IF(CMAKE_C_COMPILER)
INCLUDE(${CMAKE_ROOT}/Modules/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER}.cmake OPTIONAL)
......
SET(CMAKE_SHARED_LIBRARY_CREATE_FLAGS "-shared")
SET(CMAKE_DL_LIBS "-lgdi32" )
SET(CMAKE_SHARED_LIBRARY_PREFIX "")
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment