Skip to content

Commit

Permalink
Support static runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkvdb committed Mar 5, 2024
1 parent fadb65c commit 4f2f502
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions SRC_engines/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
#


cmake_minimum_required(VERSION 3.9)
cmake_minimum_required(VERSION 3.21)

option(DYNAMIC_RUNTIME "Use the dynamic runtime libraries on windows" OFF)

if("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
message(FATAL_ERROR "In-source builds are disabled.")
Expand All @@ -21,8 +23,9 @@ project(
DESCRIPTION "The EPANET Program for Water Distribution System Analysis"
)

set (LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set (EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>$<$<BOOL:${DYNAMIC_RUNTIME}>:DLL>")

add_compile_definitions(
$<$<CXX_COMPILER_ID:MSVC>:_CRT_SECURE_NO_WARNINGS>
Expand Down

0 comments on commit 4f2f502

Please sign in to comment.