-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
28 lines (23 loc) · 808 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
28 lines (23 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# CMakeList.txt : CMake project for EmbeddedIOServices, include source and define
# project specific logic here.
#
cmake_minimum_required (VERSION 3.30[3.30])
option(EmbeddedIOServices_build_tests "Build all of EmbeddedIOServices tests" OFF)
set(TARGET EmbeddedIOServices)
set(HDR_DIR include)
set(SRCS_DIR src)
project(${TARGET} CXX)
# headers are always in include/
file(GLOB_RECURSE HDRS CONFIGURE_DEPENDS ${HDR_DIR}/*.h)
include_directories(${HDR_DIR})
# sources are always in src/
file(GLOB_RECURSE SRCS CONFIGURE_DEPENDS ${SRCS_DIR}/*.cpp)
# create library
add_library(${TARGET} STATIC ${HDRS} ${SRCS})
target_include_directories(${TARGET} PUBLIC ${HDR_DIR})
if(EmbeddedIOServices_build_tests)
#include mock
add_subdirectory (mock)
#include test
add_subdirectory(test)
endif()