File tree Expand file tree Collapse file tree 3 files changed +19
-16
lines changed Expand file tree Collapse file tree 3 files changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,10 @@ set(LINK_DLL_IGA 1)
3434endif (IGC_BUILD)
3535
3636
37+ # Set up build flags to use dynamic multi-threaded runtime (/MD) or
38+ # to use static multi-threaded runtime (/MT)
39+ option (LINK_AS_STATIC_LIB "link with /MT or /MD" ON )
40+
3741
3842################################################################################
3943# IGA Related
@@ -125,10 +129,6 @@ BISON_TARGET(CISAParser CISA.y ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.c COMPILE_FL
125129FLEX_TARGET(CISAScanner CISA.l ${CMAKE_CURRENT_BINARY_DIR} /lex.CISA.c COMPILE_FLAGS "-PCISA ${WIN_FLEX_FLAG} " )
126130ADD_FLEX_BISON_DEPENDENCY(CISAScanner CISAParser)
127131
128- # Set up windows mobile build flags to use dynamic multi-threaded runtime (/MD)
129- # Set up windows(other) build flags to use static multi-threaded runtime (/MT)
130-
131-
132132# Set up include paths used by all the libraries in this file
133133# There is a windows specific include path for GNUTools support that is inside the repository. The
134134# equivalent support is already included for Linux and Android so is not required for those platforms
@@ -137,7 +137,11 @@ if (WIN32)
137137 set (Jitter_inc_dirs ${Jitter_inc_dirs} ${GNUTOOLS_DIR} /include )
138138endif (WIN32 )
139139
140- win_static_runtime()
140+ if (LINK_AS_STATIC_LIB)
141+ win_static_runtime()
142+ else (LINK_AS_STATIC_LIB)
143+ win_dynamic_runtime()
144+ endif (LINK_AS_STATIC_LIB)
141145
142146# Some Android specific paths primarily to enable support for STL
143147if (ANDROID AND MEDIA_IGA)
Original file line number Diff line number Diff line change 11project (IGA_EXE)
2- # Set up windows mobile build flags to use dynamic multi-threaded runtime (/MD)
3- # Set up windows(other) build flags to use static multi-threaded runtime (/MT)
4- #
5- # This mimicks vISA/MDF configurations
6- win_static_runtime()
72
3+ if (LINK_AS_STATIC_LIB)
4+ win_static_runtime()
5+ else (LINK_AS_STATIC_LIB)
6+ win_dynamic_runtime()
7+ endif (LINK_AS_STATIC_LIB)
88
99set (IGA_EXE_CPP
1010 ${CMAKE_CURRENT_SOURCE_DIR} /assemble.cpp
Original file line number Diff line number Diff line change @@ -21,12 +21,11 @@ add_subdirectory(MemManager)
2121add_subdirectory (Models)
2222add_subdirectory (Timer)
2323
24- # Set up windows mobile build flags to use dynamic multi-threaded runtime (/MD)
25- # Set up windows(other) build flags to use static multi-threaded runtime (/MT)
26- #
27- # This mimicks vISA/MDF configurations
28-
29- win_static_runtime()
24+ if (LINK_AS_STATIC_LIB)
25+ win_static_runtime()
26+ else (LINK_AS_STATIC_LIB)
27+ win_dynamic_runtime()
28+ endif (LINK_AS_STATIC_LIB)
3029
3130# Mimick IGC/MDF warnings within IGA library on our side to ensure we don't
3231# break the build.
You can’t perform that action at this time.
0 commit comments