Blame view

CMakeLists.txt 1.47 KB
51becbde   Peter M. Groen   Committed the ent...
1
  cmake_minimum_required(VERSION 3.0)
b5d9e433   Peter M. Groen   Fixed License Hea...
2
3
  # ==============================================================================
  # Check to see if we're a submodule or top-repo.
b5d9e433   Peter M. Groen   Fixed License Hea...
4
  if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
59367614   Peter M. Groen   Install script..
5
      message( STATUS "Looks like we're a single module" )
b5d9e433   Peter M. Groen   Fixed License Hea...
6
7
      LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
  elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
59367614   Peter M. Groen   Install script..
8
      message( STATUS "Looks like we're a submodule" )
b5d9e433   Peter M. Groen   Fixed License Hea...
9
10
11
12
13
      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..
14
  # ==============================================================================
51becbde   Peter M. Groen   Committed the ent...
15
  # Check to see if there is versioning information available
e0b1fe64   Peter M. Groen   Fixed script.
16
17
18
19
  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..
20
21
  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...
22
23
  endif()
  
59367614   Peter M. Groen   Install script..
24
25
26
  # ==============================================================================
  # = Include build information
  include(osdevversion)
51becbde   Peter M. Groen   Committed the ent...
27
  include(projectheader)
59367614   Peter M. Groen   Install script..
28
  
51becbde   Peter M. Groen   Committed the ent...
29
30
31
  project_header(osdev_mqtt)
  
  add_subdirectory(src)
b5d9e433   Peter M. Groen   Fixed License Hea...
32
33
  add_subdirectory(examples/pub)
  add_subdirectory(examples/sub)
51becbde   Peter M. Groen   Committed the ent...
34
35
36
37
  
  
  # include(packaging)
  # package_component()