Browse Source

Fix locating files which are directly under the data dir (and not in the cmake dir)

master
Martchus 3 months ago
parent
commit
1b6ffb561a
  1. 2
      cmake/modules/BasicConfig.cmake
  2. 2
      cmake/modules/LibraryTarget.cmake
  3. 2
      cmake/modules/TestTarget.cmake
  4. 1
      cmake/templates/Config.cmake.in

2
cmake/modules/BasicConfig.cmake

@ -292,7 +292,7 @@ if (NOT META_NO_TIDY)
set(CLANG_FORMAT_RULES "${CPP_UTILITIES_SOURCE_DIR}/coding-style.clang-format")
endif ()
if (NOT EXISTS "${CLANG_FORMAT_RULES}")
set(CLANG_FORMAT_RULES "${CPP_UTILITIES_CONFIG_DIRS}/codingstyle.clang-format")
set(CLANG_FORMAT_RULES "${CPP_UTILITIES_DATA_DIRS}/codingstyle.clang-format")
endif ()
endif ()

2
cmake/modules/LibraryTarget.cmake

@ -264,7 +264,7 @@ foreach (CONFIG_TARGET ${CONFIG_TARGETS})
"${CONFIG_TEMPLATE_FILE}" "${CONFIG_TARGET}"
INSTALL_DESTINATION "${CMAKE_CONFIG_INSTALL_DESTINATION}"
PATH_VARS CMAKE_MODULE_INSTALL_DESTINATION CMAKE_CONFIG_INSTALL_DESTINATION HEADER_INSTALL_DESTINATION
BIN_INSTALL_DESTINATION LIB_INSTALL_DESTINATION)
BIN_INSTALL_DESTINATION LIB_INSTALL_DESTINATION META_DATA_DIR)
endforeach ()
list(APPEND CMAKE_CONFIG_FILES "${CMAKE_CURRENT_BINARY_DIR}/${META_PROJECT_NAME}${META_CONFIG_SUFFIX}Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${META_PROJECT_NAME}${META_CONFIG_SUFFIX}ConfigVersion.cmake")

2
cmake/modules/TestTarget.cmake

@ -265,7 +265,7 @@ if (CLANG_SOURCE_BASED_COVERAGE_AVAILABLE)
set(OVERALL_COVERAGE_AKW_SCRIPT "${CPP_UTILITIES_SOURCE_DIR}/tests/calculateoverallcoverage.awk")
endif ()
if (NOT EXISTS "${OVERALL_COVERAGE_AKW_SCRIPT}")
set(OVERALL_COVERAGE_AKW_SCRIPT "${CPP_UTILITIES_CONFIG_DIRS}/tests/calculateoverallcoverage.awk")
set(OVERALL_COVERAGE_AKW_SCRIPT "${CPP_UTILITIES_DATA_DIRS}/tests/calculateoverallcoverage.awk")
endif ()
add_custom_command(
OUTPUT "${COVERAGE_OVERALL_REPORT_FILE}"

1
cmake/templates/Config.cmake.in

@ -20,6 +20,7 @@ set(@META_PROJECT_VARNAME_UPPER@_IS_HEADER_ONLY @META_HEADER_ONLY_LIB@)
set(@META_PROJECT_VARNAME_UPPER@_INCLUDE_DIRS "@PACKAGE_HEADER_INSTALL_DESTINATION@")
set(@META_PROJECT_VARNAME_UPPER@_BIN_DIR "@PACKAGE_BIN_INSTALL_DESTINATION@")
set(@META_PROJECT_VARNAME_UPPER@_LIB_DIR "@PACKAGE_LIB_INSTALL_DESTINATION@")
set(@META_PROJECT_VARNAME_UPPER@_DATA_DIRS "@PACKAGE_META_DATA_DIR@")
set(@META_PROJECT_VARNAME_UPPER@_MODULE_DIRS "@PACKAGE_CMAKE_MODULE_INSTALL_DESTINATION@")
set(@META_PROJECT_VARNAME_UPPER@_CONFIG_DIRS "@PACKAGE_CMAKE_CONFIG_INSTALL_DESTINATION@")
set(@META_PROJECT_VARNAME_UPPER@_PRIVATE_QT_MODULES "@QT_MODULES@")

Loading…
Cancel
Save