Skip to content

Commit

Permalink
Patch macOS lib to support Apple notarization (#57)
Browse files Browse the repository at this point in the history
- Update libjssc.dylib to be build with SDK 10.9, the minimum required for notarization.
- Fix an order of operations issue with the strip command
- Bump version to 2.9.1
  • Loading branch information
tresf authored May 30, 2019
1 parent cb6d351 commit be4368f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@ elseif(FORCE_M64)
# Build 64-bit binary on Linux
set_target_properties(jssc PROPERTIES COMPILE_FLAGS -m64 LINK_FLAGS -m64)
endif()
# Copy native library back to source tree
add_custom_command(TARGET jssc POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/natives/ ${CMAKE_CURRENT_SOURCE_DIR}/src/main/resources-precompiled/natives/
)

# Call strip on non-debug builds
if(CMAKE_STRIP AND NOT CMAKE_BUILD_TYPE MATCHES "Deb")
Expand All @@ -139,6 +135,11 @@ if(CMAKE_STRIP AND NOT CMAKE_BUILD_TYPE MATCHES "Deb")
add_custom_command(TARGET jssc POST_BUILD COMMAND "${CMAKE_STRIP}" ${STRIP_ARGS} $<TARGET_FILE:jssc>)
endif()

# Copy native library back to source tree
add_custom_command(TARGET jssc POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/natives/ ${CMAKE_CURRENT_SOURCE_DIR}/src/main/resources-precompiled/natives/
)

# Handle compiler warnings
if(MSVC)
#TODO Treat warnings as errors /WX
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github.java-native.jssc</groupId>
<artifactId>jssc</artifactId>
<version>2.9.0</version>
<version>2.9.1</version>

<properties>
<java.version>1.6</java.version>
Expand Down
2 changes: 1 addition & 1 deletion src/java/jssc/SerialNativeInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
public class SerialNativeInterface {

private static final String libVersion = "2.9";
private static final String libMinorSuffix = "0"; //since 0.9.0
private static final String libMinorSuffix = "1"; //since 0.9.0

public static final int OS_LINUX = 0;
public static final int OS_WINDOWS = 1;
Expand Down
Binary file modified src/main/resources-precompiled/natives/osx_64/libjssc.dylib
Binary file not shown.

0 comments on commit be4368f

Please sign in to comment.