style: format CMakelists.txt

This commit is contained in:
ToruNiina 2019-06-19 16:53:45 +09:00
parent dee32e7d5e
commit cab3144507
2 changed files with 21 additions and 21 deletions

View File

@ -54,17 +54,17 @@ set(toml11_config_version ${toml11_config_dir}/toml11ConfigVersion.cm
add_library(toml11 INTERFACE) add_library(toml11 INTERFACE)
target_include_directories(toml11 INTERFACE target_include_directories(toml11 INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${toml11_install_include_dir}> $<INSTALL_INTERFACE:${toml11_install_include_dir}>
) )
add_library(toml11::toml11 ALIAS toml11) add_library(toml11::toml11 ALIAS toml11)
# Write config and version config files # Write config and version config files
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
write_basic_package_version_file( write_basic_package_version_file(
${toml11_config_version} ${toml11_config_version}
VERSION ${toml11_VERSION} VERSION ${toml11_VERSION}
COMPATIBILITY SameMajorVersion COMPATIBILITY SameMajorVersion
) )
configure_package_config_file( configure_package_config_file(
@ -76,30 +76,30 @@ configure_package_config_file(
# Install config files # Install config files
install(FILES ${toml11_config} ${toml11_config_version} install(FILES ${toml11_config} ${toml11_config_version}
DESTINATION ${toml11_install_cmake_dir} DESTINATION ${toml11_install_cmake_dir}
) )
# Install header files # Install header files
install( install(
FILES toml.hpp FILES toml.hpp
DESTINATION "${toml11_install_include_dir}" DESTINATION "${toml11_install_include_dir}"
) )
install( install(
DIRECTORY "toml" DIRECTORY "toml"
DESTINATION "${toml11_install_include_dir}" DESTINATION "${toml11_install_include_dir}"
FILES_MATCHING PATTERN "*.hpp" FILES_MATCHING PATTERN "*.hpp"
) )
# Export targets and install them # Export targets and install them
install(TARGETS toml11 install(TARGETS toml11
EXPORT toml11Targets EXPORT toml11Targets
) )
install(EXPORT toml11Targets install(EXPORT toml11Targets
FILE toml11Targets.cmake FILE toml11Targets.cmake
DESTINATION ${toml11_install_cmake_dir} DESTINATION ${toml11_install_cmake_dir}
NAMESPACE toml11:: NAMESPACE toml11::
) )
if (toml11_BUILD_TEST) if (toml11_BUILD_TEST)
add_subdirectory(tests) add_subdirectory(tests)
endif () endif ()