Skip to content

Commit c2efde9

Browse files
committed
Update CMakeLists.txt
Change the output path for the generated version.h to the build directory.
1 parent 9180314 commit c2efde9

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ string(TIMESTAMP APP_BUILD_DATE "%Y-%m-%d %H:%M:%S")
3232
# Configure version.h
3333
configure_file(
3434
${CMAKE_SOURCE_DIR}/version.h.in
35-
${CMAKE_SOURCE_DIR}/src/version.h
35+
${CMAKE_BINARY_DIR}/version.h
3636
@ONLY
3737
)
3838

39-
# Add the generated version.h to your include paths
39+
# Add the generated version.h to the include paths
4040
include_directories(${CMAKE_BINARY_DIR})
4141

4242
# Add source files
@@ -60,4 +60,7 @@ target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
6060
# Set output directory (optional)
6161
set_target_properties(${PROJECT_NAME} PROPERTIES
6262
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
63-
)
63+
)
64+
65+
# Clap de fin
66+
message(STATUS "Configuration of ${PROJECT_NAME} complete")

0 commit comments

Comments
 (0)