-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
51 lines (41 loc) · 1.27 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
48
49
cmake_minimum_required(VERSION 3.16)
project(iec61937-13 VERSION 1.0.2)
project(iec61937-13 LANGUAGES CXX)
set (CMAKE_CXX_STANDARD 11)
# Set output directories
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
# Define dependencies
include(FetchContent)
# ilo from 2023-05-22
FetchContent_Declare(
ilo
GIT_REPOSITORY https://github.com/Fraunhofer-IIS/ilo.git
GIT_TAG r1.0.0
)
# mmtisobmff from 2023-05-22
FetchContent_Declare(
mmtisobmff
GIT_REPOSITORY https://github.com/Fraunhofer-IIS/mmtisobmff.git
GIT_TAG r1.0.0
)
get_directory_property(parentDir PARENT_DIRECTORY)
# Only enable building binaries by default if project is top-level
if(parentDir)
set(iec61937-13_BUILD_BINARIES OFF CACHE BOOL "Build demo binaries")
else()
set(iec61937-13_BUILD_BINARIES ON CACHE BOOL "Build demo binaries")
endif()
set(iec61937-13_BUILD_DOC OFF CACHE BOOL "Build doxygen doc")
# Add libraries
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
add_subdirectory(src)
# Add binaries
if(iec61937-13_BUILD_BINARIES)
add_subdirectory(demo)
endif()
# Add documentation
if(iec61937-13_BUILD_DOC)
add_subdirectory(doc)
endif()