-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
48 lines (41 loc) · 1.58 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
#########################################################################
#
# BRL-CAD
#
# Copyright (c) 2011-2023 United States Government as represented by
# the U.S. Army Research Laboratory.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# version 2.1 as published by the Free Software Foundation.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this file; see the file named COPYING for more
# information.
#
#########################################################################
# @file CMakeLists.txt
#########################################################################
CMAKE_MINIMUM_REQUIRED(VERSION 3.18)
PROJECT(MOOSE)
ENABLE_TESTING()
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
SET(CMAKE_CXX_STANDARD 11)
# We need BRL-CAD
FIND_PACKAGE(BRLCAD REQUIRED)
IF(BRLCAD_VERSION_FOUND)
SET(VERSION_H_CONTENT
"#define BRLCAD_LIB_MAJOR ${BRLCAD_VERSION_MAJOR}\n"
"#define BRLCAD_LIB_MINOR ${BRLCAD_VERSION_MINOR}\n"
"#define BRLCAD_LIB_PATCH ${BRLCAD_VERSION_PATCH}\n"
)
FILE(WRITE ${CMAKE_BINARY_DIR}/include/brlcad/version.h ${VERSION_H_CONTENT})
ADD_SUBDIRECTORY(src)
ELSE(BRLCAD_VERSION_FOUND)
MESSAGE(FATAL_ERROR "\tCould not find BRL-CAD")
ENDIF(BRLCAD_VERSION_FOUND)