diff --git a/CMakeLists.txt b/CMakeLists.txt index 4fc8f8ef..faa453e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,5 +91,5 @@ gen_cfg_main() # Create the main *.hpp config file gen_main_hpp_config() # create module file for lmod manager -configure_file("${PROJECT_SOURCE_DIR}/common/misc/alpscore.lmod.in" "${CMAKE_BINARY_DIR}/alpscore.lmod") +configure_file("${PROJECT_SOURCE_DIR}/common/misc/alpscore.lmod.in" "${PROJECT_BINARY_DIR}/alpscore.lmod") diff --git a/common/cmake/ALPSCommonModuleDefinitions.cmake b/common/cmake/ALPSCommonModuleDefinitions.cmake index 92a8c976..26976171 100644 --- a/common/cmake/ALPSCommonModuleDefinitions.cmake +++ b/common/cmake/ALPSCommonModuleDefinitions.cmake @@ -111,7 +111,7 @@ endif() # add includes and libs for each module macro(alps_add_module module module_path) - set(${module}_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/${module_path}/include ${CMAKE_BINARY_DIR}/${module_path}/include) + set(${module}_INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/${module_path}/include ${PROJECT_BINARY_DIR}/${module_path}/include) set(${module}_LIBRARIES ${module}) endmacro(alps_add_module) @@ -284,8 +284,8 @@ macro(gen_documentation) endmacro(gen_documentation) function(gen_main_hpp_config) - configure_file("${PROJECT_SOURCE_DIR}/utilities/include/config.hpp.in" "${CMAKE_BINARY_DIR}/utilities/include/alps/config.hpp") - install(FILES "${CMAKE_BINARY_DIR}/utilities/include/alps/config.hpp" DESTINATION include/alps) + configure_file("${PROJECT_SOURCE_DIR}/utilities/include/config.hpp.in" "${PROJECT_BINARY_DIR}/utilities/include/alps/config.hpp") + install(FILES "${PROJECT_BINARY_DIR}/utilities/include/alps/config.hpp" DESTINATION include/alps) endfunction(gen_main_hpp_config) macro(gen_pkg_config) diff --git a/common/cmake/ALPSEnableEigen.cmake b/common/cmake/ALPSEnableEigen.cmake index 3b2f606e..6df4441a 100644 --- a/common/cmake/ALPSEnableEigen.cmake +++ b/common/cmake/ALPSEnableEigen.cmake @@ -107,7 +107,7 @@ function(add_eigen) message(STATUS "eigen requested") if (NOT ALPS_EIGEN_UNPACK_DIR) - set(ALPS_EIGEN_UNPACK_DIR "${CMAKE_BINARY_DIR}/eigen") + set(ALPS_EIGEN_UNPACK_DIR "${PROJECT_BINARY_DIR}/eigen") endif() if (NOT ALPS_EIGEN_TGZ_FILE) set(ALPS_EIGEN_TGZ_FILE "${ALPS_EIGEN_UNPACK_DIR}/eigen.tgz")