Skip to content

Commit

Permalink
Merge pull request #3 from Janrupf/master
Browse files Browse the repository at this point in the history
Statically link VC runtime
  • Loading branch information
jan-br authored Mar 31, 2020
2 parents ca7717c + 44543f9 commit acb2080
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea/
build/
cmake-build*/
.gradle/
.gradle/
*.log
20 changes: 19 additions & 1 deletion opus-jni-native/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
###################
# Policy settings #
###################
cmake_policy(SET CMP0091 NEW)
cmake_policy(SET CMP0048 NEW)

#################
# Project setup #
#################
Expand Down Expand Up @@ -41,4 +47,16 @@ set(OPUS_JNI_NATIVE_SOURCES
##############
add_library(opus-jni-native SHARED ${OPUS_JNI_NATIVE_SOURCES})
target_link_libraries(opus-jni-native PUBLIC opus ${JNI_LIBRARIES})
target_include_directories(opus-jni-native PUBLIC ${JNI_INCLUDE_DIRS} ${GENERATED_JNI_HEADERS_DIR})
target_include_directories(opus-jni-native PUBLIC ${JNI_INCLUDE_DIRS} ${GENERATED_JNI_HEADERS_DIR})

if(MSVC)
set_property(
TARGET opus
PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreadedDebug"
)

set_property(
TARGET opus-jni-native
PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreadedDebug"
)
endif()

0 comments on commit acb2080

Please sign in to comment.