From 50c10994491fc4a6fd748f783f4eb97e9a6902e9 Mon Sep 17 00:00:00 2001 From: Davis King Date: Tue, 17 Oct 2017 10:24:23 -0400 Subject: [PATCH] Yet more cmake cleanup --- dlib/java/CMakeLists.txt | 3 +-- dlib/java/cmake_swig_jni | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlib/java/CMakeLists.txt b/dlib/java/CMakeLists.txt index f099b19d6..4d66a513c 100644 --- a/dlib/java/CMakeLists.txt +++ b/dlib/java/CMakeLists.txt @@ -5,7 +5,6 @@ set(java_package_name net.dlib) set(source_files ) -include(../cmake_utils/use_cpp_11.cmake) include(../cmake_utils/release_build_by_default) include_directories( @@ -13,7 +12,7 @@ include_directories( ) # Additional dependencies -#include(../../dlib/cmake) +#add_subdirectory(../../dlib dlib_build) #set(additional_link_libraries dlib::dlib) # Tell swig to put the output files (the shared library and .jar) into the local folder. diff --git a/dlib/java/cmake_swig_jni b/dlib/java/cmake_swig_jni index 0a572e60a..3a220b04a 100644 --- a/dlib/java/cmake_swig_jni +++ b/dlib/java/cmake_swig_jni @@ -42,6 +42,8 @@ cmake_minimum_required (VERSION 2.8.12) +include(../cmake_utils/use_cpp_11.cmake) + # This block of code tries to figure out what the JAVA_HOME environment # variable should be by looking at the folder that contains the java # executable. @@ -178,6 +180,7 @@ FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${binary_dir_name}") set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/swig.i PROPERTIES CPLUSPLUS ON) swig_add_module(${output_library_name} java ${CMAKE_CURRENT_BINARY_DIR}/swig.i ${source_files}) +enable_cpp11_for_target(${output_library_name}) include_directories(${JNI_INCLUDE_DIRS}) swig_link_libraries(${output_library_name} ${additional_link_libraries})