September 2018
Intermediate to advanced
606 pages
14h 32m
English
We will follow these steps to register the version in our template header file:
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)project(recipe-04 VERSION 2.0.1 LANGUAGES C)
configure_file( version.h.in generated/version.h @ONLY )
Finally, we define the executable and provide the target include path:
add_executable(example example.c)target_include_directories(example PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/generated )
Read now
Unlock full access