C/xpcExample: Add CMake support for building xpcExample that uses the xplaneconnect library.
Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
This commit is contained in:
5
C/xpcExample/xpcExample/CMakeLists.txt
Normal file
5
C/xpcExample/xpcExample/CMakeLists.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
|
||||
project(xpcExample)
|
||||
|
||||
add_subdirectory(src)
|
||||
13
C/xpcExample/xpcExample/src/CMakeLists.txt
Normal file
13
C/xpcExample/xpcExample/src/CMakeLists.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
|
||||
add_executable(main main.cpp)
|
||||
|
||||
include_directories(/usr/local/include/xplaneConnect)
|
||||
|
||||
find_library(XPLANECONNECT_LIB NAMES xplaneconnect PATHS "/usr/local/lib")
|
||||
|
||||
message(STATUS "Library path XPLANECONNECT_LIB is " ${XPLANECONNECT_LIB})
|
||||
|
||||
target_link_libraries(main ${XPLANECONNECT_LIB})
|
||||
|
||||
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||
Reference in New Issue
Block a user