Created
December 14, 2015 09:16
-
-
Save zoobab/8b13a16b8704d619a910 to your computer and use it in GitHub Desktop.
CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I have added some debug messages status to expose variables used by cmake | |
cmake_minimum_required (VERSION 2.8) | |
project (czmqjni CXX) | |
enable_language (C) | |
include_directories (${JAVA_INCLUDE_PATH} /etc/java-config-2/current-system-vm/include/linux src/native/include) | |
find_library (ZMQ_LIBRARY NAMES zmq libzmq REQUIRED) | |
find_library (CZMQ_LIBRARY NAMES czmq REQUIRED) | |
find_package (JNI REQUIRED) | |
message (STATUS "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}") | |
message (STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}") | |
message (STATUS "JNI_FOUND=${JNI_FOUND}") | |
message (STATUS "JAVA_AWT_LIBRARY=${JAVA_AWT_LIBRARY}") | |
message (STATUS "JAVA_JVM_LIBRARY=${JAVA_JVM_LIBRARY}") | |
message (STATUS "JAVA_INCLUDE_PATH=${JAVA_INCLUDE_PATH}") | |
message (STATUS "JAVA_INCLUDE_PATH2=${JAVA_INCLUDE_PATH2}") | |
message (STATUS "JAVA_AWT_INCLUDE_PATH=${JAVA_AWT_INCLUDE_PATH}") | |
set (czmqjni_sources | |
src/main/c/org_zeromq_czmq_Zarmour.c | |
src/main/c/org_zeromq_czmq_Zconfig.c | |
src/main/c/org_zeromq_czmq_Zdir.c | |
src/main/c/org_zeromq_czmq_ZdirPatch.c | |
src/main/c/org_zeromq_czmq_Zfile.c | |
src/main/c/org_zeromq_czmq_Zframe.c | |
src/main/c/org_zeromq_czmq_Zhash.c | |
src/main/c/org_zeromq_czmq_Zhashx.c | |
src/main/c/org_zeromq_czmq_Ziflist.c | |
src/main/c/org_zeromq_czmq_Zlist.c | |
src/main/c/org_zeromq_czmq_Zloop.c | |
src/main/c/org_zeromq_czmq_Zmsg.c | |
src/main/c/org_zeromq_czmq_Zpoller.c | |
src/main/c/org_zeromq_czmq_Zsock.c | |
src/main/c/org_zeromq_czmq_Zstr.c | |
src/main/c/org_zeromq_czmq_Ztrie.c | |
src/main/c/org_zeromq_czmq_Zuuid.c | |
) | |
add_library (czmqjni SHARED ${czmqjni_sources}) | |
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -O2") | |
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build) | |
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build) | |
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build) | |
target_link_libraries (czmqjni ${ZMQ_LIBRARY} ${CZMQ_LIBRARY}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment