summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt28
1 files changed, 5 insertions, 23 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ad6bcd..ea62baa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -240,35 +240,13 @@ SET (LIB_TYPE STATIC)
IF (BUILD_SHARED_LIBS)
SET (LIB_TYPE SHARED)
SET (H5_BUILT_AS_DYNAMIC_LIB 1)
- IF (MSVC)
- SET (CMAKE_MFC_FLAG 0)
- FOREACH (flag_var
- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
- IF (${flag_var} MATCHES "/MT")
- STRING (REGEX REPLACE "/MT" "/MD" ${flag_var} "${${flag_var}}")
- ENDIF (${flag_var} MATCHES "/MT")
- ENDFOREACH (flag_var)
ENDIF (MSVC)
ELSE (BUILD_SHARED_LIBS)
+ SET (H5_BUILT_AS_STATIC_LIB 1)
IF (NOT WIN32)
# should this be a user setting : Everyone uses it anyway ?
ADD_DEFINITIONS (-DPIC)
ENDIF (NOT WIN32)
- IF (MSVC)
- SET (CMAKE_MFC_FLAG 0)
- FOREACH (flag_var
- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
- IF (${flag_var} MATCHES "/MD")
- STRING (REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
- ENDIF (${flag_var} MATCHES "/MD")
- ENDFOREACH (flag_var)
- ENDIF (MSVC)
ENDIF (BUILD_SHARED_LIBS)
#-----------------------------------------------------------------------------
@@ -314,6 +292,10 @@ IF (WIN32)
ENDIF (NOT CYGWIN)
ENDIF (WIN32)
+IF (MSVC)
+ SET (CMAKE_MFC_FLAG 0)
+ENDIF (MSVC)
+
SET (MAKE_SYSTEM)
IF (CMAKE_BUILD_TOOL MATCHES "make")
SET (MAKE_SYSTEM 1)