Blame view

CMakeLists.txt 1.5 KB
fe467aa5   Steven de Ridder   Initial commit MI...
1
  cmake_minimum_required(VERSION 3.0)
669ef612   Steven de Ridder   added cmake check...
2
  
3a023548   Steven de Ridder   adjusted cmakelis...
3
4
5
6
7
8
9
10
11
  project(osdev_logutils)
  # ==============================================================================
  # Check to see if we're a submodule or top-repo.
  if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/submodules/cmake)
      message( STATUS "Looks like we're a single module" )
      LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/submodules/cmake)
  elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/cmake)
      message( STATUS "Looks like we're a submodule" )
      LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/cmake)
669ef612   Steven de Ridder   added cmake check...
12
  else()
3a023548   Steven de Ridder   adjusted cmakelis...
13
      message( FATAL_ERROR "No cmake directory found. Did you run the submodules script?" )
669ef612   Steven de Ridder   added cmake check...
14
  endif()
fe467aa5   Steven de Ridder   Initial commit MI...
15
  
3a023548   Steven de Ridder   adjusted cmakelis...
16
  # ==============================================================================
fe467aa5   Steven de Ridder   Initial commit MI...
17
  # Check to see if there is versioning information available
3a023548   Steven de Ridder   adjusted cmakelis...
18
19
20
21
22
23
  if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/submodules/versioning)
      LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/submodules/versioning/cmake)
  elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/versioning)
      LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../submodules/versioning/cmake)
  else()
      message( FATAL_ERROR "No ${CURRENT_SOURCE_DIR}/osdev_versioning directory found. Did you run the submodules script?" )
fe467aa5   Steven de Ridder   Initial commit MI...
24
25
  endif()
  
3a023548   Steven de Ridder   adjusted cmakelis...
26
  # ==============================================================================
fe467aa5   Steven de Ridder   Initial commit MI...
27
28
29
30
31
32
33
34
  include(projectheader)
  project_header(osdev_logutils)
  
  add_subdirectory(src)
  add_subdirectory(tests)
  
  # include(packaging)
  # package_component()