diff --git a/.gitignore b/.gitignore index 7c92d7b..9dfd165 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea/ build/ cmake-build*/ -.gradle/ \ No newline at end of file +.gradle/ +*.log diff --git a/opus-jni-native/CMakeLists.txt b/opus-jni-native/CMakeLists.txt index be1c788..c2f8307 100644 --- a/opus-jni-native/CMakeLists.txt +++ b/opus-jni-native/CMakeLists.txt @@ -1,3 +1,9 @@ +################### +# Policy settings # +################### +cmake_policy(SET CMP0091 NEW) +cmake_policy(SET CMP0048 NEW) + ################# # Project setup # ################# @@ -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}) \ No newline at end of file +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() \ No newline at end of file