Blame view

CMakeLists.txt 851 Bytes
02844e59   Peter M. Groen   Added test to lib...
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
29
30
31
32
33
34
35
36
37
38
39
  cmake_minimum_required(VERSION 3.30)
  project(daemonbase VERSION 0.1 LANGUAGES CXX)
  include_guard(GLOBAL)
  
  if(EXISTS ${CMAKE_SOURCE_DIR}/cmake)
      # Use the cmake directives for compilers etc...
      LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
  else()
      message("Cmake source dir : ${CMAKE_SOURCE_DIR}")
  endif()
  
  include_directories( SYSTEM
      ${CMAKE_CURRENT_SOURCE_DIR}/include
  )
  
  include(compiler)
  
  set(SRC_LIST
      ${CMAKE_CURRENT_SOURCE_DIR}/include/daemonbase.h
      ${CMAKE_CURRENT_SOURCE_DIR}/include/daemonconfig.h
      ${CMAKE_CURRENT_SOURCE_DIR}/include/daemonlog.h
  )
  
  include(library)
  add_libraries()
  
  include(installation)
  install_component()
  
  include(packaging)
  package_component()
  
  link_directories(
      ${CMAKE_BINARY_DIR}/lib
  )
  
  set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
  
  add_subdirectory(test)