-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
49 lines (38 loc) · 1.36 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.17)
# BIFROST_LOCATION must be passed-in or defined by an environment variable.
# Passed-in on the CMake command line overrides the environment variable.
if( NOT BIFROST_LOCATION )
if( DEFINED ENV{BIFROST_LOCATION} )
set( BIFROST_LOCATION $ENV{BIFROST_LOCATION})
else()
message( FATAL_ERROR "Bifrost: BIFROST_LOCATION cmake variable must be defined.")
endif()
endif()
if( NOT BIFROST_FILE_IO_RELEASE_VERSION )
set( BIFROST_FILE_IO_RELEASE_VERSION 1.0.0)
endif()
# The INPUTS arg was deprecated in Bifrost 2.8. Will not compile without updating
option(USE_DEPRECATED_HEADER_PARSER_ARGS "Use old args deprecated after 2.8" OFF)
if( USE_DEPRECATED_HEADER_PARSER_ARGS )
set(HEADER_FILE_ARG "INPUTS")
else()
set(HEADER_FILE_ARG "HEADER_FILES")
endif()
set(CMAKE_CXX_STANDARD 17)
# Project Name
project(
BifrostFileIO
VERSION ${BIFROST_FILE_IO_RELEASE_VERSION}
LANGUAGES CXX
)
set(BIFROST_FILE_IO_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}-${PROJECT_VERSION}")
# Bifrost setup and utilities...
include(${BIFROST_LOCATION}/sdk/cmake/setup.cmake)
#Third-party external libs
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/external/nlohmann_json-3.11.2)
# Verbose CMake
set( CMAKE_VERBOSE_MAKEFILE TRUE)
# Find Bifrost
find_package(Bifrost REQUIRED SDK)
# Build from sources
add_subdirectory(src)