SAPIServer/speech2/cmake/ProjectFuncs.cmake
2024-07-19 22:01:05 -04:00

14 lines
604 B
CMake

function(speech2_target target)
target_compile_definitions(${target} PRIVATE "$<$<CONFIG:DEBUG>:SPEECH2_DEBUG>")
target_compile_features(${target} PRIVATE cxx_std_20)
target_include_directories(${target} PRIVATE ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/third_party ${CMAKE_CURRENT_BINARY_DIR})
# use the static multithreaded C library
set_property(TARGET ${target} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
# TODO option for this.
target_link_options(${target} PRIVATE
-Wl,/safeseh:no
-Xlinker /subsystem:console,${CMAKE_SYSTEM_VERSION}
)
endfunction()