Browse Source

Apply cmake-format

master
Martchus 2 months ago
parent
commit
072b7b5136
  1. 4
      cmake/modules/BasicConfig.cmake
  2. 13
      cmake/modules/LibraryTarget.cmake

4
cmake/modules/BasicConfig.cmake

@ -63,8 +63,8 @@ set(NAMESPACE
""
CACHE STRING "adds a prefix to files and folders installed in the OS toplevel")
if (NAMESPACE)
set(NAMESPACE_PREFIX "${NAMESPACE}-")
set(TARGET_PREFIX "${NAMESPACE}-")
set(NAMESPACE_PREFIX "${NAMESPACE}-")
set(TARGET_PREFIX "${NAMESPACE}-")
endif ()
# allow setting a library/application target suffix - A different configuration name might not require a different target

13
cmake/modules/LibraryTarget.cmake

@ -34,7 +34,8 @@ set(INCLUDE_SUBDIR "${CMAKE_INSTALL_INCLUDEDIR}")
set(HEADER_INSTALL_DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
if (NAMESPACE_PREFIX OR META_CONFIG_SUFFIX)
set(INCLUDE_SUBDIR "${INCLUDE_SUBDIR}/${NAMESPACE_PREFIX}${META_PROJECT_NAME}${META_CONFIG_SUFFIX}")
set(HEADER_INSTALL_DESTINATION "${HEADER_INSTALL_DESTINATION}/${NAMESPACE_PREFIX}${META_PROJECT_NAME}${META_CONFIG_SUFFIX}")
set(HEADER_INSTALL_DESTINATION
"${HEADER_INSTALL_DESTINATION}/${NAMESPACE_PREFIX}${META_PROJECT_NAME}${META_CONFIG_SUFFIX}")
endif ()
set(CMAKE_MODULE_INSTALL_DESTINATION "${META_DATA_DIR_ABSOLUTE}/cmake/modules")
set(CMAKE_CONFIG_INSTALL_DESTINATION "${META_DATA_DIR_ABSOLUTE}/cmake")
@ -117,7 +118,6 @@ else ()
endif ()
endif ()
# add custom libraries
append_user_defined_additional_libraries()
@ -139,10 +139,8 @@ else ()
PUBLIC ${META_ADDITIONAL_LINK_FLAGS} "${PUBLIC_LIBRARIES}"
PRIVATE "${PRIVATE_LIBRARIES}")
if (META_IS_PLUGIN)
target_include_directories(
${META_TARGET_NAME}
PRIVATE $<BUILD_INTERFACE:${TARGET_INCLUDE_DIRECTORY_BUILD_INTERFACE}>
"${PRIVATE_INCLUDE_DIRS}")
target_include_directories(${META_TARGET_NAME} PRIVATE $<BUILD_INTERFACE:${TARGET_INCLUDE_DIRECTORY_BUILD_INTERFACE}>
"${PRIVATE_INCLUDE_DIRS}")
else ()
target_include_directories(
${META_TARGET_NAME}
@ -279,7 +277,8 @@ foreach (CONFIG_TARGET ${CONFIG_TARGETS})
PATH_VARS CMAKE_MODULE_INSTALL_DESTINATION CMAKE_CONFIG_INSTALL_DESTINATION HEADER_INSTALL_DESTINATION
BIN_INSTALL_DESTINATION LIB_INSTALL_DESTINATION META_DATA_DIR)
endforeach ()
list(APPEND CMAKE_CONFIG_FILES "${CMAKE_CURRENT_BINARY_DIR}/${NAMESPACE_PREFIX}${META_PROJECT_NAME}${META_CONFIG_SUFFIX}Config.cmake"
list(APPEND CMAKE_CONFIG_FILES
"${CMAKE_CURRENT_BINARY_DIR}/${NAMESPACE_PREFIX}${META_PROJECT_NAME}${META_CONFIG_SUFFIX}Config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/${NAMESPACE_PREFIX}${META_PROJECT_NAME}${META_CONFIG_SUFFIX}ConfigVersion.cmake")
# write the CMake version config file

Loading…
Cancel
Save