From cc9c06fb1abcdc0cd1d845aa21389c6d3dbacdb8 Mon Sep 17 00:00:00 2001 From: Gennady Pospelov <g.pospelov@fz-juelich.de> Date: Wed, 6 May 2020 18:27:50 +0200 Subject: [PATCH] Fix for file names generated by Python machinery in Windows environment. --- cmake/bornagain/modules/BornAgainConfiguration.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cmake/bornagain/modules/BornAgainConfiguration.cmake b/cmake/bornagain/modules/BornAgainConfiguration.cmake index 12f8042ac54..0573874ea70 100644 --- a/cmake/bornagain/modules/BornAgainConfiguration.cmake +++ b/cmake/bornagain/modules/BornAgainConfiguration.cmake @@ -135,6 +135,17 @@ if(NOT BORNAGAIN_BUILDBOT_SERVER) configure_file(${TEMPLATE_DIR}/CTestCustom.cmake.in ${CMAKE_BINARY_DIR}/CTestCustom.cmake) endif() +if (WIN32) + # Necessary to provide correct slashes in BABuild.h + file(TO_CMAKE_PATH ${Python_EXECUTABLE} Python_EXECUTABLE) + file(TO_CMAKE_PATH ${Python_STDLIB} Python_STDLIB) + file(TO_CMAKE_PATH ${Python_LIBRARIES} Python_LIBRARIES) + file(TO_CMAKE_PATH ${Python_STDLIB} Python_STDLIB) + file(TO_CMAKE_PATH ${Python_INCLUDE_DIRS} Python_INCLUDE_DIRS) + file(TO_CMAKE_PATH ${Python_NumPy_INCLUDE_DIRS} Python_NumPy_INCLUDE_DIRS) + file(TO_CMAKE_PATH ${Python_SITELIB} Python_SITELIB) +endif() + configure_file(${TEMPLATE_DIR}/BAVersion.h.in ${BUILD_INC_DIR}/BAVersion.h @ONLY) configure_file(${TEMPLATE_DIR}/BABuild.h.in ${BUILD_INC_DIR}/BABuild.h @ONLY) configure_file(${TEMPLATE_DIR}/BATesting.h.in ${BUILD_INC_DIR}/BATesting.h @ONLY) -- GitLab