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:
Elvis Dowson
2015-01-02 14:30:02 +04:00
parent 6709765a48
commit b3fada3c64
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
cmake_minimum_required(VERSION 2.8.4)
project(xpcExample)
add_subdirectory(src)

View 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)