Move block to be with other WIN32 items
cmake_minimum_required (VERSION 3.9)
-if (WIN32 AND MSVC_STATIC_RUNTIME)
- # On MSVC, when MSVC_STATIC_RUNTIME is ON, MT (Release) and MTd (Debug) run-time libraries will be used instead of MD/MDd.
- # The default is OFF so MD/MDd are used when nothing related is passed.
- set(CMAKE_USER_MAKE_RULES_OVERRIDE
- ${CMAKE_CURRENT_SOURCE_DIR}/c_flag_overrides.cmake)
- set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
- ${CMAKE_CURRENT_SOURCE_DIR}/cxx_flag_overrides.cmake)
-endif()
-
project(maxminddb
LANGUAGES C
VERSION 1.6.0
@@ -70,6 +61,15 @@ if(WIN32)
if(BUILD_SHARED_LIBS)
set_target_properties(maxminddb PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif()
+ if(MSVC_STATIC_RUNTIME)
+ # On MSVC, when MSVC_STATIC_RUNTIME is ON, MT (Release) and MTd (Debug)
+ # run-time libraries will be used instead of MD/MDd. The default is OFF so
+ # MD/MDd are used when nothing related is passed.
+ set(CMAKE_USER_MAKE_RULES_OVERRIDE
+ ${CMAKE_CURRENT_SOURCE_DIR}/c_flag_overrides.cmake)
+ set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
+ ${CMAKE_CURRENT_SOURCE_DIR}/cxx_flag_overrides.cmake)
+ endif()
endif()
target_include_directories(maxminddb PUBLIC
