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()
37
37
38
38
find_package (StandardMathLibrary REQUIRED )
39
39
find_package (OpenMP )
40
+ find_package (JNI )
40
41
41
42
set (TARGET_ARCHITECTURE "skylake" CACHE STRING "CPU architecture" )
42
43
OptimizeForArchitecture ()
Original file line number Diff line number Diff line change @@ -255,3 +255,16 @@ file(GENERATE
255
255
BINPATH_z_=: '${J_BINPATH} '
256
256
0!:0<BINPATH,'${J_PROFILE_SCRIPT} '"
257
257
)
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 2
2
#include "jeload.h"
3
3
#include "com_jsoftware_j_JInterface.h"
4
4
#include <stdint.h>
5
- #ifdef MMSC_VER
5
+ #ifdef _MSC_VER
6
6
#pragma warning(disable: 4244)
7
7
#else
8
8
#include <strings.h>
@@ -283,7 +283,7 @@ JNIEXPORT void JNICALL Java_com_jsoftware_j_JInterface_JSetEnv
283
283
LOGD ("JSetEnv" );
284
284
const char * key = (* env )-> GetStringUTFChars (env , jkey , 0 );
285
285
const char * val = (* env )-> GetStringUTFChars (env , jval , 0 );
286
- #ifdef MMSC_VER
286
+ #ifdef _MSC_VER
287
287
_putenv_s (key ,val );
288
288
#else
289
289
setenv (key ,val ,0 );
You can’t perform that action at this time.
0 commit comments