Blame view

CMakeLists.txt 1.51 KB
51becbde   Peter M. Groen   Committed the ent...
1
  cmake_minimum_required(VERSION 3.0)
bbca8c1a   Peter M. Groen   Added comments to...
2
  project(osdev_mqtt)
b5d9e433   Peter M. Groen   Fixed License Hea...
3
4
  # ==============================================================================
  # Check to see if we're a submodule or top-repo.
b5d9e433   Peter M. Groen   Fixed License Hea...
5
  if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
59367614   Peter M. Groen   Install script..
6
      message( STATUS "Looks like we're a single module" )
b5d9e433   Peter M. Groen   Fixed License Hea...
7
8
      LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
  elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
59367614   Peter M. Groen   Install script..
9
      message( STATUS "Looks like we're a submodule" )
b5d9e433   Peter M. Groen   Fixed License Hea...
10
11
12
13
14
      LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
  else()
      message( FATAL_ERROR "No cmake directory found. Did you run the submodules script?" )
  endif()
  
59367614   Peter M. Groen   Install script..
15
  # ==============================================================================
51becbde   Peter M. Groen   Committed the ent...
16
  # Check to see if there is versioning information available
e0b1fe64   Peter M. Groen   Fixed script.
17
18
19
20
  if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/versioning)
      LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/versioning/cmake)
  elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../versioning)
      LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../versioning/cmake)
59367614   Peter M. Groen   Install script..
21
22
  else()
      message( FATAL_ERROR "No ${CURRENT_SOURCE_DIR}/osdev_versioning directory found. Did you run the submodules script?" )
51becbde   Peter M. Groen   Committed the ent...
23
24
  endif()
  
59367614   Peter M. Groen   Install script..
25
26
27
  # ==============================================================================
  # = Include build information
  include(osdevversion)
51becbde   Peter M. Groen   Committed the ent...
28
  include(projectheader)
59367614   Peter M. Groen   Install script..
29
  
51becbde   Peter M. Groen   Committed the ent...
30
31
32
  project_header(osdev_mqtt)
  
  add_subdirectory(src)
b5d9e433   Peter M. Groen   Fixed License Hea...
33
34
  add_subdirectory(examples/pub)
  add_subdirectory(examples/sub)
51becbde   Peter M. Groen   Committed the ent...
35
  
bbca8c1a   Peter M. Groen   Added comments to...
36
37
  include(packaging)
  package_component()
25b0d2f8   Peter M. Groen   Setting up Loggin...
38
  
aa0bd60b   Peter M. Groen   Disabled tests
39
  # add_subdirectory(test)