Skip to content

Commit 5c096b9

Browse files
committed
Fix MSVC builds
1 parent a008cbe commit 5c096b9

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ list(APPEND JSSC_ADDITIONAL_INCLUDES target/nar/javah-include/)
6868
# linux, macos, etc
6969
string(TOLOWER "${CMAKE_SYSTEM_NAME}" OS_NAME)
7070
if(APPLE)
71-
# scijava expects "osx", not "darwin"
71+
# See <native.lib.directory> in pox.xml
7272
set(OS_NAME "osx")
7373
endif()
7474

pom.xml

+7-5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<cmake.download.binaries>false</cmake.download.binaries>
2020
<!-- cmake maven plugin -->
2121
<cmake.classifier>linux-x86_64</cmake.classifier>
22+
<!--FIXME "Makefiles" parameter MUST be optional see cmake-maven-project/cmake-maven-project#7 -->
23+
<cmake.generator>Unix Makefiles</cmake.generator>
2224
<!-- native lib loader (dependency) -->
2325
<native.lib.directory>linux_64</native.lib.directory>
2426
</properties>
@@ -87,8 +89,8 @@
8789
<configuration>
8890
<sourcePath>${project.basedir}</sourcePath>
8991
<targetPath>${project.build.directory}/cmake</targetPath>
90-
<!--FIXME "Makefiles" should be optional see cmake-maven-project/cmake-maven-project#7 -->
91-
<generator>Unix Makefiles</generator>
92+
<!--FIXME "Makefiles" parameter MUST be optional see cmake-maven-project/cmake-maven-project#7 -->
93+
<generator>${cmake.generator}</generator>
9294
<!--TODO Use -DCMAKE_TOOLCHAIN_FILE file for cross-compile
9395
<options>
9496
<option>-DCMAKE_TOOLCHAIN_FILE=toolchain/Mingw64.cmake</option>
@@ -160,11 +162,11 @@
160162
</os>
161163
</activation>
162164
<properties>
163-
<cmake.download.binaries>true</cmake.download.binaries>
165+
<cmake.root.dir>${env.PROGRAMFILES}/CMake</cmake.root.dir>
166+
<!--FIXME "Makefiles" parameter MUST be optional see cmake-maven-project/cmake-maven-project#7 -->
167+
<cmake.generator>Visual Studio 14 2015</cmake.generator>
164168
<cmake.classifier>windows-x86_64</cmake.classifier>
165169
<native.lib.directory>windows_64</native.lib.directory>
166-
<cmake.root.dir />
167-
<cmake.child.dir />
168170
</properties>
169171
</profile>
170172

src/cpp/_nix_based/jssc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
* Get native library version
5353
*/
5454
JNIEXPORT jstring JNICALL Java_jssc_SerialNativeInterface_getNativeLibraryVersion(JNIEnv *env, jobject object) {
55-
return env->NewStringUTF("2.8.1");
55+
return env->NewStringUTF("FIXME" /* FIXME: jSSC_NATIVE_LIB_VERSION missing */);
5656
}
5757

5858
/* OK */

src/cpp/windows/jssc.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include <jni.h>
2626
#include <stdlib.h>
2727
#include <windows.h>
28-
#include "../jssc_SerialNativeInterface.h"
28+
#include <jssc_SerialNativeInterface.h>
2929

3030
//#include <iostream>
3131

@@ -35,7 +35,7 @@
3535
* Get native library version
3636
*/
3737
JNIEXPORT jstring JNICALL Java_jssc_SerialNativeInterface_getNativeLibraryVersion(JNIEnv *env, jobject object) {
38-
return env->NewStringUTF(jSSC_NATIVE_LIB_VERSION);
38+
return env->NewStringUTF("FIXME" /* FIXME: jSSC_NATIVE_LIB_VERSION missing */);
3939
}
4040

4141
/*

0 commit comments

Comments
 (0)