diff options
author | Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp> | 2021-04-15 10:48:30 +0000 |
---|---|---|
committer | Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp> | 2021-04-15 10:48:30 +0000 |
commit | b3e72c7944a738fe9201c406332cbcd878df65e3 (patch) | |
tree | 0d7c76f916859893832b0c9ed24650ac06bf3acf /CMakeLists.txt |
Initial commit for AGL cluster api library
This source code is AGL instrument cluster common API library.
Currently, this source code is missing author information, license and other.
Will be add by author.
Author: Nozomu Abe (nozo_abe@nippon-seiki.co.jp)
Committed by Naoto Yamaguchi.
Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..0f4faed --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,36 @@ +project(cluster_api C) + +cmake_minimum_required(VERSION 2.8) + +set(CLUSTER_API_LIBRARY_VERSION "1.0.0") + +# Name of library API +set(TARGET_NAME cluster_api) + +find_package(PkgConfig) + +# Build option for DEBUG +option(DEBUG_BUILD "This is debug build." OFF) + +# set gcc flags +set(CMAKE_C_FLAGS "-Wall -O2") + +if(DEBUG_BUILD) + add_definitions(-DDEBUG) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g") + set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/installdir/usr CACHE PATH "..." FORCE) +endif() + +include(GNUInstallDirs) + +# Subdirectories +add_subdirectory(src) +if(DEBUG_BUILD) + add_subdirectory(test/client_test) +endif() + +configure_file(cluster_api.pc.in cluster_api.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cluster_api.pc + DESTINATION + ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + |