Files
allwpilib/wpilibj/wpilibJavaJNI/CMakeLists.txt
Brad Miller 69d9ad70ab CMake Changes
This is the changes made by Patrick Plenefisch converting the native
code to use CMake and the CMake Maven Plugin, as opposed to the
native Maven plugin. This is to allow for compatibility with newer
versions of the GCC toolchain. All the cpp sources were moved from
maven style directories to cpp style directories for CMake.

Change-Id: I67f5e3608948f37c83b0990d232105a3784f8593
2014-04-01 11:18:29 -04:00

24 lines
1022 B
CMake

cmake_minimum_required(VERSION 2.8)
project(WPILibJavaJNI)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat=2 -Wextra")
SET(CMAKE_SKIP_BUILD_RPATH TRUE)
file(GLOB_RECURSE NI_LIBS ../../ni-libraries/*.so)
get_filename_component(HAL_API_INCLUDES ../../hal/include REALPATH)
## depends on libFRC_NetComm, halAthena Hal incl, wpilibJava (jar)
# this file requires embeddedJDKHome to be set
# all the h files must be generated, in target/include
file(GLOB_RECURSE SRC_FILES lib/*.cpp)
include_directories(target/include ${embeddedJDKHome}/include ${embeddedJDKHome}/include/linux ${HAL_API_INCLUDES})
add_library(wpilibJavaJNI SHARED ${SRC_FILES})
find_library(HAL_LIB libHALAthena.so target/lib)
add_library(HALAthena UNKNOWN IMPORTED)
set_property(TARGET HALAthena PROPERTY IMPORTED_LOCATION ${HAL_LIB})
target_link_libraries(wpilibJavaJNI HALAthena ${NI_LIBS})
INSTALL(TARGETS wpilibJavaJNI LIBRARY DESTINATION target)
# lib/ c m gcc_s ld-linux
# usr/lib stdc++
# FRC_NetworkCommunication NiFpgaLv RoboRIO_FRC_ChipObject