Changeset 4845


Ignore:
Timestamp:
02/25/09 17:31:07 (11 years ago)
Author:
curtis
Message:

On OS X, name Jace library as libjace.jnilib rather than libjace.dylib.
Bio-Formats C++ bindings work on Mac OS X now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/native/bf-cpp/CMakeLists.txt

    r4844 r4845  
    7777add_library(jace SHARED ${JACE_SRC}) 
    7878 
    79 target_link_libraries(jace ${Boost_LIBRARIES}) 
     79target_link_libraries(jace ${JAVA_JVM_LIBRARY} ${Boost_LIBRARIES}) 
    8080 
    8181set_target_properties(jace PROPERTIES 
    8282  COMPILE_FLAGS "-Wall -fpermissive") 
     83 
     84# HACK - Mac OS X 10.4 and earlier requires .jnilib extension rather than 
     85#        .dylib when loading native code with System.loadLibrary(String). 
     86if(APPLE) 
     87  set_target_properties(jace PROPERTIES SUFFIX ".jnilib") 
     88endif(APPLE) 
    8389 
    8490### build Bio-Formats C++ bindings ### 
     
    9096 
    9197add_library(bfjace SHARED ${BFJACE_SRC}) 
     98 
     99target_link_libraries(bfjace jace) 
    92100 
    93101set_target_properties(bfjace PROPERTIES 
     
    101109 
    102110target_link_libraries(showinf bfjace jace 
    103   ${JAVA_JVM_LIBRARY} ${Boost_LIBRARIES}) 
     111  ${JAVA_JVM_LIBRARY}) 
    104112 
    105113### TEMP - build some examples for testing ### 
     
    108116 
    109117target_link_libraries(example1 bfjace jace 
    110   ${JAVA_JVM_LIBRARY} ${Boost_LIBRARIES}) 
     118  ${JAVA_JVM_LIBRARY}) 
    111119 
    112120add_executable(array_example source/array_example.cpp) 
    113121 
    114122target_link_libraries(array_example bfjace jace 
    115   ${JAVA_JVM_LIBRARY} ${Boost_LIBRARIES}) 
     123  ${JAVA_JVM_LIBRARY}) 
Note: See TracChangeset for help on using the changeset viewer.