CMakeLists.txt 940 Bytes
Newer Older
1
cmake_minimum_required(VERSION 3.5)
2 3
set(CMAKE_CXX_STANDARD 11)

4
project(ba_system_intersectionController LANGUAGES CXX)
5 6 7 8 9 10 11 12 13 14 15 16 17

#set cmake module path
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

# add dependencies
find_package(Armadillo REQUIRED)
set(INCLUDE_DIRS ${INCLUDE_DIRS} ${Armadillo_INCLUDE_DIRS})
set(LIBS ${LIBS} ${Armadillo_LIBRARIES})

# additional commands

# create static library
include_directories(${INCLUDE_DIRS})
18 19
add_library(ba_system_intersectionController ba_system_intersectionController.h)
target_include_directories(ba_system_intersectionController PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
20
target_link_libraries(ba_system_intersectionController PUBLIC ${LIBS})
21
set_target_properties(ba_system_intersectionController PROPERTIES LINKER_LANGUAGE CXX)
22 23

# export cmake project
24
export(TARGETS ba_system_intersectionController FILE ba_system_intersectionController.cmake)
25 26

# additional commands end