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 50 51 52 53 54 55 56 57 58
|
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-FileCopyrightText: 2007-2015 Sven Eckelmann <sven@narfation.org>
cmake_minimum_required(VERSION 3.18)
project(s3d C CXX)
set(VERSION 0.2.3)
# set cmake policies
cmake_policy(SET CMP0003 NEW)
cmake_policy(SET CMP0072 NEW)
# Add directory with library checks to search path
list(APPEND CMAKE_MODULE_PATH "${s3d_SOURCE_DIR}/cmake/modules")
include(S3DInternals)
# set path to objects
set(OBJECTPATH "${S3D_DATA_INSTALL_DIR}")
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
if (NOT BUILD_TYPE MATCHES "REL(WITHDEBINFO|EASE)")
set(OBJECTPATH "${OBJECTPATH}:${s3d_SOURCE_DIR}/objs")
endif (NOT BUILD_TYPE MATCHES "REL(WITHDEBINFO|EASE)")
# set debug level with -DDEBUG=level
include(SetDebugLevel)
# Enable profiling support with -DPROFILING
include(EnableProfiling)
# Set some compiler flags
include(SetCCWarnFlags)
# Enable C9X if possible
# disabled because s3d uses c9x features but doesnt compile with it
#include(SetC9X)
# Run configure stuff
include(ConfigureChecks.cmake)
add_subdirectory(libs3d)
add_subdirectory(libs3dw)
add_subdirectory(apps)
add_subdirectory(cmake)
add_subdirectory(Documentation)
add_subdirectory(example)
add_subdirectory(objs)
add_subdirectory(server)
file(GLOB INCLUDE_EXPERIMENTAL experimental)
if (INCLUDE_EXPERIMENTAL)
add_subdirectory(experimental)
endif (INCLUDE_EXPERIMENTAL)
# Generate s3drc
configure_file(s3drc.cmake "${s3d_BINARY_DIR}/s3drc")
install(PROGRAMS "${s3d_BINARY_DIR}/s3drc" DESTINATION "${CFG_INSTALL_DIR}")
|