Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statically link VC runtime #3

Merged
merged 2 commits into from
Mar 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()