Commit ced49af5 authored by Ben Boeckel's avatar Ben Boeckel

cmake: write the version header to the current binary directory

These were all overwriting each other otherwise.
parent 5e296c3b
......@@ -62,7 +62,7 @@ MACRO(VersionWrite vProjectName export_name)
FOREACH(il ${include_list})
SET(includes "${includes}\n\#include \"${il}\"")
ENDFOREACH()
FILE(WRITE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${vProjectName}Version.hpp
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${vProjectName}Version.hpp
"/* Current Version of ${vProjectName}
* Major is: ${vMajor}
* Minor is: ${vMinor}
......@@ -73,7 +73,7 @@ ${includes}
extern ${export_name} ProjectVersion ${vProjectName}Version;\n"
)
FILE(WRITE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${vProjectName}Version.cpp
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${vProjectName}Version.cpp
"/* Current Version of ${vProjectName}
* Make sure to include this file in your built sources
*/
......
......@@ -5,7 +5,7 @@ include(SetUpVersion)
include(TestBigEndian)
if(VERSION_CONTROL_AUTOUPDATE OR
NOT EXISTS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/XdmfVersion.hpp)
NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/XdmfVersion.hpp)
VersionCreate(
"Xdmf"
"${XDMF_MAJOR_VERSION}" "${XDMF_MINOR_VERSION}" "${XDMF_PATCH_VERSION}"
......@@ -114,7 +114,7 @@ set(XdmfCoreSources
XdmfSparseMatrix
XdmfSubset
XdmfSystemUtils
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/XdmfVersion
${CMAKE_CURRENT_BINARY_DIR}/XdmfVersion
XdmfVisitor
XdmfWriter)
......@@ -149,7 +149,7 @@ set(XdmfCoreSources
core/XdmfSubset
core/XdmfSystemUtils
${FOUND_TIFF_LOCATION}
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/XdmfVersion
${CMAKE_CURRENT_BINARY_DIR}/XdmfVersion
core/XdmfVisitor
core/XdmfWriter
PARENT_SCOPE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment