Common C++ classes and routines used by my applications such as argument parser, IO and conversion utilities
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
670 B

# before including this module, all relevant variables must be set
# just include this module as last one since nothing should depend on it
if(NOT TARGET_CONFIG_DONE)
message(FATAL_ERROR "Before including the ConfigHeader module, the BasicConfig module must be included.")
endif()
# find config.h template
include(TemplateFinder)
find_template_file("config.h" CPP_UTILITIES CONFIG_H_TEMPLATE_FILE)
# add configuration header
configure_file(
"${CONFIG_H_TEMPLATE_FILE}"
"${CMAKE_CURRENT_BINARY_DIR}/resources/config.h"
)
# ensure generated include files can be included via #include "resources/config.h"
include_directories("${CMAKE_CURRENT_BINARY_DIR}")