File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ endif()
3737
3838find_package (StandardMathLibrary REQUIRED)
3939find_package (OpenMP)
40+ find_package (JNI)
4041
4142set (TARGET_ARCHITECTURE "skylake" CACHE STRING "CPU architecture" )
4243OptimizeForArchitecture()
Original file line number Diff line number Diff line change @@ -255,3 +255,16 @@ file(GENERATE
255255BINPATH_z_=: '${J_BINPATH} '
2562560!:0<BINPATH,'${J_PROFILE_SCRIPT} '"
257257)
258+
259+ if (JNI_FOUND)
260+ add_library (jnative)
261+ target_include_directories (jnative PRIVATE ${JNI_INCLUDE_DIRS} )
262+ target_link_libraries (jnative PRIVATE ${JNI_LIBRARIES} )
263+ target_sources (jnative PRIVATE
264+ andjnative.c
265+ jeload.h
266+ jeload.c
267+ com_jsoftware_j_JInterface.h
268+ ../makemsvc/jnative/jnative.def
269+ )
270+ endif ()
Original file line number Diff line number Diff line change 22#include "jeload.h"
33#include "com_jsoftware_j_JInterface.h"
44#include <stdint.h>
5- #ifdef MMSC_VER
5+ #ifdef _MSC_VER
66#pragma warning(disable: 4244)
77#else
88#include <strings.h>
@@ -283,7 +283,7 @@ JNIEXPORT void JNICALL Java_com_jsoftware_j_JInterface_JSetEnv
283283 LOGD ("JSetEnv" );
284284 const char * key = (* env )-> GetStringUTFChars (env , jkey , 0 );
285285 const char * val = (* env )-> GetStringUTFChars (env , jval , 0 );
286- #ifdef MMSC_VER
286+ #ifdef _MSC_VER
287287 _putenv_s (key ,val );
288288#else
289289 setenv (key ,val ,0 );
You can’t perform that action at this time.
0 commit comments