From 198eb76cab1e25a5a50c026cec9e520fd7ebead9 Mon Sep 17 00:00:00 2001 From: Hunter Belanger Date: Mon, 9 May 2022 21:20:08 +0200 Subject: [PATCH] Revert "Places configured version.h in source dir, for building with FetchContent" This reverts commit 9888d9163bbb4f1f4acedc22de284c8afd7fa9b0. --- .gitignore | 1 - CMakeLists.txt | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b4ed5552f6..88e59895d5 100644 --- a/.gitignore +++ b/.gitignore @@ -51,7 +51,6 @@ src/CMakeFiles/ src/bin/ src/cmake_install.cmake src/install_manifest.txt -include/openmc/version.h # Nuclear data scripts/nndc diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e5063c39e..28f917956a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ set(OPENMC_VERSION_MAJOR 0) set(OPENMC_VERSION_MINOR 13) set(OPENMC_VERSION_RELEASE 1) set(OPENMC_VERSION ${OPENMC_VERSION_MAJOR}.${OPENMC_VERSION_MINOR}.${OPENMC_VERSION_RELEASE}) -configure_file(include/openmc/version.h.in "${CMAKE_CURRENT_SOURCE_DIR}/include/openmc/version.h" @ONLY) +configure_file(include/openmc/version.h.in "${CMAKE_BINARY_DIR}/include/openmc/version.h" @ONLY) # Setup output directories set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) @@ -495,3 +495,4 @@ install(FILES install(FILES man/man1/openmc.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) install(FILES LICENSE DESTINATION "${CMAKE_INSTALL_DOCDIR}" RENAME copyright) install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install(FILES "${CMAKE_BINARY_DIR}/include/openmc/version.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openmc)