RSE-Model/CMakeLists.txt

53 lines
1.8 KiB
CMake

# CMakeLists.txt
####################################################
# Written by JackCarterSmith, 2022
# This code is released under the RSE license.
####################################################
# CMake requirement and general configuration
cmake_minimum_required(VERSION 3.12)
cmake_policy(VERSION 3.12)
set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
if(DEFINED ENV{MS_COMPATIBLE})
set(CMAKE_GNUtoMS ON) # Enable compatibility level to exported libraries
endif()
# Project definition
if(DEFINED ENV{CI}) # Jenkins CI integration mode
project(rse-model VERSION $ENV{CI_VERSION}.$ENV{CI_BUILD_NUMBER} DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C)
set(RSE_MODEL_NAME $ENV{CI_OUTPUT_NAME}_${PROJECT_VERSION})
else() # Standalone project mode, should not be used for release.
project(rse-model VERSION 1.0.0 DESCRIPTION "RogueSquadron Extractor - Model" LANGUAGES C)
set(RSE_MODEL_NAME RSEModel_${PROJECT_VERSION})
endif()
set(RSP_MODEL_LIB_NAME RSPModel${PROJECT_VERSION_MAJOR}${PROJECT_VERSION_MINOR})
# The project is divided in two parts:
# - RSPModelLib is the parser library for model type data, it's take HOB file as input and output extracted datas.
# It is intended to be used by others apps like rendering engine or others.
# - RSEModel is the standalone application of the library, take HOB file in argument and output OBJ/MTL file.
# Artists or users can directly use this program to retrieve data in common datas format.
add_subdirectory(RSPModelLib)
add_subdirectory(RSEModel)
# GPG signature custom command
#add_custom_command(
# OUTPUT ""
# COMMAND gpg --batch --detach-sign
# -o ${RSE_MOD_NAME}_${CI_SYS_TARGET}.gpg
# ${RSE_MOD_NAME}
# DEPENDS ${RSE_MOD_NAME}
# VERBATIM
#)
# Install project executable
install(TARGETS rse-model
RUNTIME DESTINATION bin
)