diff --git a/CMakeLists.txt b/CMakeLists.txt index a20e75d..29b33f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,7 @@ cmake_minimum_required(VERSION 3.10) -project(Raycaster) -add_executable(raycaster src/main.cpp) \ No newline at end of file +project(Raycaster VERSION 0.1) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) +add_executable(raycaster src/main.cpp) +configure_file(src/RaycasterConfig.h.in RaycasterConfig.h) +target_include_directories(raycaster PUBLIC "${PROJECT_BINARY_DIR}") \ No newline at end of file diff --git a/src/RaycasterConfig.h.in b/src/RaycasterConfig.h.in new file mode 100644 index 0000000..29e5601 --- /dev/null +++ b/src/RaycasterConfig.h.in @@ -0,0 +1,4 @@ +// the configured options and settings for Tutorial +#define Raycaster_VERSION_MAJOR @Raycaster_VERSION_MAJOR@ +#define Raycaster_VERSION_MINOR @Raycaster_VERSION_MINOR@ + diff --git a/src/main.cpp b/src/main.cpp index 87c1ed8..f6379cf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,7 @@ #include +#include "RaycasterConfig.h" -int main(){ - std::cout << "test" << std::endl; +int main(int argc, char *argv[]){ + std::cout << Raycaster_VERSION_MAJOR << "." << Raycaster_VERSION_MINOR << std::endl; return 0; } \ No newline at end of file