Replace STRING(PREPEND ..) in CMakeLists.txt to support older CMake versions

This commit is contained in:
gabime 2019-10-06 13:13:26 +03:00
parent 70357ceff2
commit 1549ff12f1

View File

@ -205,7 +205,7 @@ if (SPDLOG_INSTALL)
#--------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------
get_target_property(PKG_CONFIG_DEFINES spdlog INTERFACE_COMPILE_DEFINITIONS) get_target_property(PKG_CONFIG_DEFINES spdlog INTERFACE_COMPILE_DEFINITIONS)
string(REPLACE ";" " -D" PKG_CONFIG_DEFINES "${PKG_CONFIG_DEFINES}") string(REPLACE ";" " -D" PKG_CONFIG_DEFINES "${PKG_CONFIG_DEFINES}")
string(PREPEND PKG_CONFIG_DEFINES "-D") string(CONCAT PKG_CONFIG_DEFINES "-D" "${PKG_CONFIG_DEFINES}")
configure_file("cmake/${PROJECT_NAME}.pc.in" "${pkg_config}" @ONLY) configure_file("cmake/${PROJECT_NAME}.pc.in" "${pkg_config}" @ONLY)
install(FILES "${pkg_config}" DESTINATION "${pkgconfig_install_dir}") install(FILES "${pkg_config}" DESTINATION "${pkgconfig_install_dir}")