Skip to content
Permalink
Browse files

avoid core relinking on cmake changes

  • Loading branch information
jef-n committed Dec 19, 2015
1 parent 60f246a commit 89583b74e4557e0a482d70b651fa9f37acfdb8be
@@ -2,5 +2,3 @@ INSTALL(FILES srs.db qgis.db symbology-ng-style.db spatialite.db customization.x
DESTINATION ${QGIS_DATA_DIR}/resources)
INSTALL(DIRECTORY cpt-city-qgis-min DESTINATION ${QGIS_DATA_DIR}/resources)
INSTALL(DIRECTORY themes DESTINATION ${QGIS_DATA_DIR}/resources)

ADD_SUBDIRECTORY(context_help)

This file was deleted.

@@ -1,6 +1,6 @@
<h3>Identify Features</h3>
<p>
The results dialog shows all the features identified within the search tolerance. To see the results details, expand the feature information on the left of each feature.
The result dialog shows all the features identified within the search tolerance. To see the results details, expand the feature information on the left of each feature.
</p>
<p>
The search radius can be set in the options dialog <label>Settings > Options > Map tools</label>, Identify section, as a percentage of map width. In this section you may also set identify mode to <label>Current layer</label>, <label>Top down, stop at first</label>, <label>Top down</label>. <br>
@@ -0,0 +1,24 @@
import os
import glob
import sys

cpp = open(sys.argv[1], "w")
cpp.write(
"#include \"qgscontexthelp.h\"\n"
"#include <QCoreApplication>\n\n"
"QHash<QString, QString> QgsContextHelp::gContextHelpTexts;\n"
"\n"
"void QgsContextHelp::init()\n"
"{\n"
" if( !gContextHelpTexts.isEmpty() )\n"
" return;\n"
)

for f in sorted(glob.glob('resources/context_help/*')):
n = os.path.basename(f)
with open(f) as content:
cpp.write("\n gContextHelpTexts.insert( \"{0}\", QCoreApplication::translate( \"context_help\", \"{1}\") );".format(
n, content.read().replace("\\", "&#92;").replace('\\', '\\\\').replace('"', '\\"').replace('\n', '\\n"\n\"')))

cpp.write("\n}\n")
cpp.close()
@@ -336,10 +336,18 @@ STRING(REPLACE "$" "$$" JSON_HELP_FILES "${JSON_HELP_FILES}")
STRING(REPLACE "\(" "\\(" JSON_HELP_FILES "${JSON_HELP_FILES}")
STRING(REPLACE "\)" "\\)" JSON_HELP_FILES "${JSON_HELP_FILES}")
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/qgsexpression_texts.cpp
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripts/process_function_template.py ${CMAKE_CURRENT_BINARY_DIR}/qgsexpression_texts.cpp.temp
COMMAND ${CMAKE_COMMAND} -DSRC=${CMAKE_CURRENT_BINARY_DIR}/qgsexpression_texts.cpp.temp -DDST=${CMAKE_CURRENT_SOURCE_DIR}/qgsexpression_texts.cpp -P ${CMAKE_SOURCE_DIR}/cmake/CopyIfChanged.cmake
DEPENDS ${JSON_HELP_FILES}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripts/process_function_template.py ${CMAKE_CURRENT_BINARY_DIR}/qgsexpression_texts.cpp.temp
COMMAND ${CMAKE_COMMAND} -DSRC=${CMAKE_CURRENT_BINARY_DIR}/qgsexpression_texts.cpp.temp -DDST=${CMAKE_CURRENT_SOURCE_DIR}/qgsexpression_texts.cpp -P ${CMAKE_SOURCE_DIR}/cmake/CopyIfChanged.cmake
DEPENDS ${JSON_HELP_FILES}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)

FILE(GLOB CONTEXT_HELP_FILES "${CMAKE_SOURCE_DIR}/resources/context_help/*")
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/qgscontexthelp_texts.cpp
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/scripts/process_contexthelp.py ${CMAKE_CURRENT_BINARY_DIR}/qgscontexthelp_texts.cpp.temp
COMMAND ${CMAKE_COMMAND} -DSRC=${CMAKE_CURRENT_BINARY_DIR}/qgscontexthelp_texts.cpp.temp -DDST=${CMAKE_CURRENT_SOURCE_DIR}/qgscontexthelp_texts.cpp -P ${CMAKE_SOURCE_DIR}/cmake/CopyIfChanged.cmake
DEPENDS ${CONTEXT_HELP_FILES}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)

IF(ENABLE_MODELTEST)

1 comment on commit 89583b7

@m-kuhn

This comment has been minimized.

Copy link
Member

@m-kuhn m-kuhn commented on 89583b7 Dec 19, 2015

👍 great!!

Please sign in to comment.
You can’t perform that action at this time.