Remove the getter, remove the pyramid
[platform/core/system/sessiond.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 3.16)
2 project(sessiond LANGUAGES C CXX)
3
4 # The following is needed, as we have both "sessiond" and "libsessiond" in our project,
5 # and we don't want "libsessiond" to become "liblibsessiond". That would be tragic.
6 set(CMAKE_SHARED_LIBRARY_PREFIX "")
7
8 # Needed for ASLR to work
9 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fPIE -Wno-error=shadow -Werror=missing-field-initializers")
10 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIE -Wno-error=shadow -Werror=missing-field-initializers")
11 set(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
12
13 add_subdirectory(common)
14 add_subdirectory(libsessiond)
15 add_subdirectory(sessiond)
16 add_subdirectory(clientExample)
17
18 option(ENABLE_TARGET_TESTS "On target tests" ON)
19 if(ENABLE_TARGET_TESTS)
20         find_package(GTest REQUIRED)
21         add_subdirectory(libsessiond/target_test)
22 endif(ENABLE_TARGET_TESTS)
23
24 enable_testing()
25
26 #set ON if want run libsessiond test
27 option(ENABLE_LIB_TESTS "Run libsessiond unit tests after build" OFF)
28 if(ENABLE_LIB_TESTS)
29         find_package(GTest REQUIRED)
30         include(CTest)
31         add_subdirectory(libsessiond/test)
32 endif(ENABLE_LIB_TESTS)
33
34 #set ON if want run sessiond tests
35 option(ENABLE_SESSIOND_TESTS "Run sessiond unit tests after build" OFF)
36
37 if(ENABLE_SESSIOND_TESTS)
38         find_package(GTest REQUIRED)
39         include(CTest)
40         add_subdirectory(sessiond/test)
41 endif(ENABLE_SESSIOND_TEST)