cmake_minimum_required(VERSION 3.16) project(sessiond LANGUAGES C CXX) # The following is needed, as we have both "sessiond" and "libsessiond" in our project, # and we don't want "libsessiond" to become "liblibsessiond". That would be tragic. set(CMAKE_SHARED_LIBRARY_PREFIX "") add_subdirectory(libsessiond) add_subdirectory(sessiond) enable_testing() #set ON if want run libsessiond test option(ENABLE_LIB_TESTS "Run libsessiond unit tests after build" OFF) if(ENABLE_LIB_TESTS) find_package(GTest REQUIRED) include(CTest) add_subdirectory(libsessiond/test) endif(ENABLE_LIB_TESTS) #set ON if want run sessiond tests option(ENABLE_SESSIOND_TESTS "Run sessiond unit tests after build" OFF) if(ENABLE_SESSIOND_TESTS) find_package(GTest REQUIRED) include(CTest) add_subdirectory(sessiond/test) endif(ENABLE_SESSIOND_TESTS)