Skip to content

Commit b70d0ac

Browse files
committed
Statically link MSVC runtime
1 parent 45bdad6 commit b70d0ac

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#Open Ephys GUI main build file
2-
cmake_minimum_required(VERSION 3.5.0)
2+
cmake_minimum_required(VERSION 3.15)
3+
cmake_policy(SET CMP0091 NEW)
34

45
set(GUI_VERSION 0.6.1)
56

@@ -80,7 +81,7 @@ add_executable(open-ephys
8081

8182

8283
target_include_directories(open-ephys PRIVATE ${JUCE_DIRECTORY} ${JUCE_DIRECTORY}/modules)
83-
target_compile_features(open-ephys PUBLIC cxx_auto_type cxx_generalized_initializers)
84+
target_compile_features(open-ephys PUBLIC cxx_auto_type cxx_generalized_initializers cxx_std_17)
8485

8586
file(GLOB _bitfiles "${RESOURCES_DIRECTORY}/Bitfiles/*.bit")
8687
file(GLOB _xmlfiles "${RESOURCES_DIRECTORY}/Configs/*.xml")
@@ -151,6 +152,7 @@ if(MSVC)
151152
set_property(TARGET open-ephys APPEND PROPERTY COMPILE_DEFINITIONS "JUCE_API=__declspec(dllexport)")
152153
target_compile_options(open-ephys PRIVATE /sdl- /nologo /MP /W0 /bigobj)
153154
target_link_libraries(open-ephys setupapi.lib opengl32.lib glu32.lib)
155+
set_property(TARGET open-ephys APPEND PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
154156
set_property(TARGET open-ephys APPEND PROPERTY VS_DEBUGGER_COMMAND "Debug\\open-ephys.exe")
155157
set_property(TARGET open-ephys APPEND_STRING PROPERTY LINK_FLAGS_DEBUG " /NODEFAULTLIB:\"libcmt.lib\" /NODEFAULTLIB:\"msvcrt.lib\"")
156158
set_property(TARGET open-ephys APPEND_STRING PROPERTY LINK_FLAGS " /SUBSYSTEM:WINDOWS")

Source/Processors/RecordNode/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#Open Ephys GUI directory-specific file
2-
set_property(TARGET open-ephys PROPERTY CXX_STANDARD 17)
32

43
#add files in this folder
54
add_sources(open-ephys

0 commit comments

Comments
 (0)