From b3fada3c642b0f10f5bdbab9fd6e00838af12af5 Mon Sep 17 00:00:00 2001 From: Elvis Dowson Date: Fri, 2 Jan 2015 14:30:02 +0400 Subject: [PATCH] C/xpcExample: Add CMake support for building xpcExample that uses the xplaneconnect library. Signed-off-by: Elvis Dowson --- C/xpcExample/xpcExample/CMakeLists.txt | 5 +++++ C/xpcExample/xpcExample/src/CMakeLists.txt | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 C/xpcExample/xpcExample/CMakeLists.txt create mode 100644 C/xpcExample/xpcExample/src/CMakeLists.txt diff --git a/C/xpcExample/xpcExample/CMakeLists.txt b/C/xpcExample/xpcExample/CMakeLists.txt new file mode 100644 index 0000000..79ce885 --- /dev/null +++ b/C/xpcExample/xpcExample/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 2.8.4) + +project(xpcExample) + +add_subdirectory(src) diff --git a/C/xpcExample/xpcExample/src/CMakeLists.txt b/C/xpcExample/xpcExample/src/CMakeLists.txt new file mode 100644 index 0000000..8c0308b --- /dev/null +++ b/C/xpcExample/xpcExample/src/CMakeLists.txt @@ -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)