-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
47 lines (34 loc) · 1.48 KB
/
CMakeLists.txt
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
40
41
42
43
44
45
46
47
cmake_minimum_required(VERSION 3.7.0 FATAL_ERROR) # CONTRIBUTIONS WELCOME: Tests of previous/future versions which work or not
if( EXISTS "${CMAKE_BINARY_DIR}/CMakeLists.txt")
message(FATAL_ERROR "Refusing to run in-source build.")
endif()
project(tagem CXX) # WARNING: Sets some important variables about the plarform. Don't call find_package before setting a project name.
find_package(Compsky REQUIRED)
include_directories(${COMPSKY_INCLUDE_DIRS})
set(TAGEM_MAJOR_VERSION 0)
set(TAGEM_MINOR_VERSION 1)
set(TAGEM_PATCH_VERSION 0)
set(TAGEM_VERSION ${TAGEM_MAJOR_VERSION}.${TAGEM_MINOR_VERSION}.${TAGEM_PATCH_VERSION})
# BEGIN src: https://gitlab.kitware.com/cmake/community/wikis/doc/tutorials/How-to-create-a-ProjectConfig.cmake-file
if(WIN32 AND NOT CYGWIN)
set(DEF_INSTALL_CMAKE_DIR CMake)
else()
set(DEF_INSTALL_CMAKE_DIR lib/CMake/tagem)
endif()
set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation directory for CMake files")
# Make relative paths absolute (needed later on)
foreach(p LIB BIN INCLUDE CMAKE)
set(var INSTALL_${p}_DIR)
if(NOT IS_ABSOLUTE "${${var}}")
set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
endif()
endforeach()
# set up include-directories
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include" "${PROJECT_SOURCE_DIR}")
if(EXISTS utils)
add_subdirectory(utils)
endif()
if(EXISTS caffe)
add_subdirectory(caffe)
endif()
# END src: https://gitlab.kitware.com/cmake/community/wikis/doc/tutorials/How-to-create-a-ProjectConfig.cmake-file