From 8c8def5de552c25c4b6eb18f4e53189304c3df9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 25 Aug 2021 12:17:45 +0200 Subject: [PATCH] Start making use of CMake 3.4 string(APPEND) --- CMake/GenerateMappings.cmake | 12 ++++++------ CMakeLists.txt | 4 ++-- docs/CMakeLists.txt | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMake/GenerateMappings.cmake b/CMake/GenerateMappings.cmake index 47e63741..c8c9e23f 100644 --- a/CMake/GenerateMappings.cmake +++ b/CMake/GenerateMappings.cmake @@ -26,19 +26,19 @@ foreach(line ${lines}) if (line MATCHES "^[0-9a-fA-F]") if (line MATCHES "platform:Windows") if (GLFW_WIN32_MAPPINGS) - set(GLFW_WIN32_MAPPINGS "${GLFW_WIN32_MAPPINGS}\n") + string(APPEND GLFW_WIN32_MAPPINGS "\n") endif() - set(GLFW_WIN32_MAPPINGS "${GLFW_WIN32_MAPPINGS}\"${line}\",") + string(APPEND GLFW_WIN32_MAPPINGS "\"${line}\",") elseif (line MATCHES "platform:Mac OS X") if (GLFW_COCOA_MAPPINGS) - set(GLFW_COCOA_MAPPINGS "${GLFW_COCOA_MAPPINGS}\n") + string(APPEND GLFW_COCOA_MAPPINGS "\n") endif() - set(GLFW_COCOA_MAPPINGS "${GLFW_COCOA_MAPPINGS}\"${line}\",") + string(APPEND GLFW_COCOA_MAPPINGS "\"${line}\",") elseif (line MATCHES "platform:Linux") if (GLFW_LINUX_MAPPINGS) - set(GLFW_LINUX_MAPPINGS "${GLFW_LINUX_MAPPINGS}\n") + string(APPEND GLFW_LINUX_MAPPINGS "\n") endif() - set(GLFW_LINUX_MAPPINGS "${GLFW_LINUX_MAPPINGS}\"${line}\",") + string(APPEND GLFW_LINUX_MAPPINGS "\"${line}\",") endif() endif() endforeach() diff --git a/CMakeLists.txt b/CMakeLists.txt index b10848b3..e255863b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -256,10 +256,10 @@ endif() # Export GLFW library dependencies #-------------------------------------------------------------------- foreach(arg ${glfw_PKG_DEPS}) - set(deps "${deps} ${arg}") + string(APPEND deps " ${arg}") endforeach() foreach(arg ${glfw_PKG_LIBS}) - set(libs "${libs} ${arg}") + string(APPEND libs " ${arg}") endforeach() set(GLFW_PKG_CONFIG_REQUIRES_PRIVATE "${deps}" CACHE INTERNAL diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 2347858e..d88888d4 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -21,7 +21,7 @@ set(GLFW_DOXYGEN_SOURCES # Format the source list into a Doxyfile INPUT value that Doxygen can parse foreach(path IN LISTS GLFW_DOXYGEN_SOURCES) - set(GLFW_DOXYGEN_INPUT "${GLFW_DOXYGEN_INPUT} \\\n\"${GLFW_SOURCE_DIR}/${path}\"") + string(APPEND GLFW_DOXYGEN_INPUT " \\\n\"${GLFW_SOURCE_DIR}/${path}\"") endforeach() configure_file(Doxyfile.in Doxyfile @ONLY)