Skip to content

Commit

Permalink
Fix build with CMake 3.18
Browse files Browse the repository at this point in the history
It looks like CMake 3.18 fixed escaping of `$` in generated Makefiles. It does on FreeBSD, at least, where I had to apply this patch in packaging to get existing QGis packages to build against newer CMake. I'm still checking if this doesn't break with older CMake, though -- I'm fairly confident of the syntax, but you never know until it compiles.
  • Loading branch information
adriaandegroot authored and nyalldawson committed Aug 3, 2020
1 parent fc82f1d commit f38f5f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/CMakeLists.txt
Expand Up @@ -701,9 +701,9 @@ SET(QGIS_CORE_SRCS
)

FILE(GLOB JSON_HELP_FILES "${CMAKE_SOURCE_DIR}/resources/function_help/json/*")
IF(NOT USING_NINJA)
IF(CMAKE_VERSION VERSION_LESS "3.18" AND NOT USING_NINJA)
STRING(REPLACE "$" "$$" JSON_HELP_FILES "${JSON_HELP_FILES}")
ENDIF(NOT USING_NINJA)
ENDIF(CMAKE_VERSION VERSION_LESS "3.18" AND NOT USING_NINJA)
STRING(REPLACE "\(" "\\(" JSON_HELP_FILES "${JSON_HELP_FILES}")
STRING(REPLACE "\)" "\\)" JSON_HELP_FILES "${JSON_HELP_FILES}")
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgsexpression_texts.cpp
Expand Down

0 comments on commit f38f5f6

Please sign in to comment.