File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -4,17 +4,17 @@ on: [push, pull_request]
44
55jobs :
66 CMakeVersionTest :
7- name : Test build with CMake 3.1 .0
7+ name : Test build with CMake 3.16 .0
88 runs-on : ubuntu-20.04
99 steps :
1010 - uses : actions/checkout@v3
1111 with :
1212 fetch-depth : 0
1313 - name : Download models
1414 run : ./autogen.sh
15- - name : Install CMake 3.1
15+ - name : Install CMake 3.16
1616 run : |
17- curl -sL https://github.com/Kitware/CMake/releases/download/v3.1 .0/cmake-3.1 .0-Linux-x86_64.sh -o cmakeinstall.sh
17+ curl -sL https://github.com/Kitware/CMake/releases/download/v3.16 .0/cmake-3.16 .0-Linux-x86_64.sh -o cmakeinstall.sh
1818 chmod +x cmakeinstall.sh
1919 sudo ./cmakeinstall.sh --prefix=/usr/local --exclude-subdir
2020 rm cmakeinstall.sh
Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.1 )
1+ cmake_minimum_required (VERSION 3.16 )
22list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR} /cmake" )
33
44include (OpusPackageVersion)
@@ -97,6 +97,12 @@ if(APPLE)
9797 add_feature_info(OPUS_BUILD_FRAMEWORK OPUS_BUILD_FRAMEWORK ${OPUS_BUILD_FRAMEWORK_HELP_STR} )
9898endif ()
9999
100+ if (MSVC )
101+ set (OPUS_STATIC_RUNTIME_HELP_STR "build with static runtime library." )
102+ option (OPUS_STATIC_RUNTIME ${OPUS_STATIC_RUNTIME_HELP_STR} OFF )
103+ add_feature_info(OPUS_STATIC_RUNTIME OPUS_STATIC_RUNTIME ${OPUS_STATIC_RUNTIME_HELP_STR} )
104+ endif ()
105+
100106set (OPUS_FIXED_POINT_DEBUG_HELP_STR "debug fixed-point implementation." )
101107cmake_dependent_option(OPUS_FIXED_POINT_DEBUG
102108 ${OPUS_FIXED_POINT_DEBUG_HELP_STR}
@@ -265,6 +271,14 @@ if(OPUS_CUSTOM_MODES)
265271 list (APPEND Opus_PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR} /include /opus_custom.h)
266272endif ()
267273
274+ if (MSVC )
275+ if (OPUS_STATIC_RUNTIME)
276+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
277+ else ()
278+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL" )
279+ endif ()
280+ endif ()
281+
268282add_library (opus ${opus_headers} ${opus_sources} ${opus_sources_float} ${Opus_PUBLIC_HEADER} )
269283add_library (Opus::opus ALIAS opus)
270284
You can’t perform that action at this time.
0 commit comments