From ac3bec9067710d0dc1ce3b8ca9ea3f46265c63d5 Mon Sep 17 00:00:00 2001 From: Stefan Kebekus Date: Sun, 1 Mar 2020 14:41:28 +0100 Subject: [PATCH] Add support for generated sources --- 3rdParty/CMakeLists.txt | 6 +- 3rdParty/generateFontQRC.py | 20 ------ CMakeLists.txt | 1 + generatedSources/CMakeLists.txt | 75 ++++++++++++++++++++++ generatedSources/README.md | 10 +++ generatedSources/generateFontQRC.py | 23 +++++++ src/CMakeLists.txt | 98 +---------------------------- src/flightMap.qrc.in | 65 +++++++++---------- src/icons.qrc.in | 4 +- 9 files changed, 147 insertions(+), 155 deletions(-) delete mode 100755 3rdParty/generateFontQRC.py create mode 100644 generatedSources/CMakeLists.txt create mode 100644 generatedSources/README.md create mode 100755 generatedSources/generateFontQRC.py diff --git a/3rdParty/CMakeLists.txt b/3rdParty/CMakeLists.txt index b2650217b..58a2a7a3d 100644 --- a/3rdParty/CMakeLists.txt +++ b/3rdParty/CMakeLists.txt @@ -26,8 +26,4 @@ endif() # MapBox fonts # -execute_process( - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/generateFontQRC.py - ) -set(flightMapFontsQRC ${CMAKE_CURRENT_BINARY_DIR}/flightMap-fonts.qrc CACHE INTERNAL "" FORCE) +set(mapBoxFont_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/openseamap-gl CACHE INTERNAL "" FORCE) diff --git a/3rdParty/generateFontQRC.py b/3rdParty/generateFontQRC.py deleted file mode 100755 index 8950ad22a..000000000 --- a/3rdParty/generateFontQRC.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/python3 - -import glob -import sys - -file = open('flightMap-fonts.qrc', 'w') -file.write('\n') -file.write(' \n') -file.write(' \n') - -for fileName in glob.glob(sys.path[0]+'/**/*.pbf', recursive=True): - fontName = fileName.split('/')[-2]+'/'+fileName.split('/')[-1] - file.write(' {}\n'.format(fontName, fileName)) - if fileName.split('/')[-2] == 'Roboto Regular': - file.write(' {}\n'.format(fileName.split('/')[-1], fileName)) - - -file.write(' \n') -file.write('\n') -file.close() diff --git a/CMakeLists.txt b/CMakeLists.txt index 89483a980..d00d888c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,7 @@ endif() # Subdirectories add_subdirectory(3rdParty) +add_subdirectory(generatedSources) add_subdirectory(metadata) add_subdirectory(packaging) add_subdirectory(src) diff --git a/generatedSources/CMakeLists.txt b/generatedSources/CMakeLists.txt new file mode 100644 index 000000000..ee85fda8b --- /dev/null +++ b/generatedSources/CMakeLists.txt @@ -0,0 +1,75 @@ +# +# Generate PNG versions of the main program icon +# + +add_custom_target(mainIcons + COMMAND mkdir -p ${CMAKE_CURRENT_SOURCE_DIR}/metadata + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/metadata/${APP_ID}_angular.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/metadata/${APP_ID}_angular.png -h 512 -w 512 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/metadata/${APP_ID}.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/metadata/${APP_ID}.png -h 512 -w 512 + COMMENT "Generated sources: main program icons" + ) + + +# +# Sprites for the flight map +# + +add_custom_target(flightMapSprites + COMMAND mkdir -p ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD.png -h 30 -w 30 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD@2x.png -h 60 -w 60 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-GLD.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-GLD.png -h 20 -w 20 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-GLD.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-GLD@2x.png -h 40 -w 40 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-GRASS.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-GRASS.png -h 30 -w 30 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-GRASS.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-GRASS@2x.png -h 60 -w 60 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-INOP.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-INOP.png -h 30 -w 30 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-INOP.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-INOP@2x.png -h 60 -w 60 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-MIL.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-MIL.png -h 30 -w 30 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-MIL.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-MIL@2x.png -h 60 -w 60 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-MIL-GRASS.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-MIL-GRASS.png -h 30 -w 30 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-MIL-GRASS.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-MIL-GRASS@2x.png -h 60 -w 60 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-MIL-PAVED.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-MIL-PAVED.png -h 30 -w 30 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-MIL-PAVED.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-MIL-PAVED@2x.png -h 60 -w 60 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-PAVED.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-PAVED.png -h 30 -w 30 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-PAVED.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-PAVED@2x.png -h 60 -w 60 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-UL.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-UL.png -h 20 -w 20 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-UL.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-UL@2x.png -h 40 -w 40 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-WATER.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-WATER.png -h 30 -w 30 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/AD-WATER.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-WATER@2x.png -h 60 -w 60 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/MRP.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/MRP.png -h 25 -w 25 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/MRP.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/MRP@2x.png -h 50 -w 50 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/NDB.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/NDB.png -h 25 -w 25 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/NDB.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/NDB@2x.png -h 50 -w 50 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/RP.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/RP.png -h 25 -w 25 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/RP.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/RP@2x.png -h 50 -w 50 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/VOR.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/VOR.png -w 22 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/VOR.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/VOR@2x.png -w 44 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/VORDME.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/VORDME.png -w 22 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/VORDME.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/VORDME@2x.png -w 44 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/VORTAC.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/VORTAC.png -w 26 + COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/src/flightMap/sprites/VORTAC.svg -o ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/VORTAC@2x.png -w 52 + COMMENT "Generated sources: flight map sprites" + ) + + +# +# MapBox font ressource +# + +add_custom_target(mapBoxFontRessource + COMMAND mkdir -p ${CMAKE_CURRENT_SOURCE_DIR}/flightMap + COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/generateFontQRC.py ${CMAKE_SOURCE_DIR}/3rdParty ${CMAKE_CURRENT_SOURCE_DIR}/flightMap + COMMENT "Generated sources: mapbox font ressource" + ) +set(flightMapFontsQRC ${CMAKE_CURRENT_BINARY_DIR}/flightMap-fonts.qrc CACHE INTERNAL "" FORCE) + + +# +# Target 'generatedSources' that combines all of the above +# + +add_custom_target(generatedSources + DEPENDS flightMapSprites + DEPENDS mainIcons + DEPENDS mapBoxFontRessource + ) diff --git a/generatedSources/README.md b/generatedSources/README.md new file mode 100644 index 000000000..81c125b87 --- /dev/null +++ b/generatedSources/README.md @@ -0,0 +1,10 @@ +# Generated Sources + +The subdirectories of this directory contains source files that have been +generated from other sources, for instance icons in PNG format that have been +generated from scalable vector graphics. We include these generated sources here +because the tools required to build them are not universally available on all +platforms. + +There exists a special CMake target, **generatedSources** that re-builds the +source files in this directory. diff --git a/generatedSources/generateFontQRC.py b/generatedSources/generateFontQRC.py new file mode 100755 index 000000000..c90e58ee1 --- /dev/null +++ b/generatedSources/generateFontQRC.py @@ -0,0 +1,23 @@ +#!/bin/python3 + +import glob +import sys + +file = open(sys.argv[2]+'/flightMap-fonts.qrc.in', 'w') +file.write('\n') +file.write(' \n') +file.write(' \n') + +for fileName in glob.glob(sys.argv[1]+'/**/*.pbf', recursive=True): + fontName = fileName.split('/')[-2]+'/'+fileName.split('/')[-1] + file.write(' '.format(fontName) + + "${CMAKE_SOURCE_DIR}/3rdParty/openseamap-gl/fonts/" + + '{}\n'.format(fontName)) + if fileName.split('/')[-2] == 'Roboto Regular': + file.write(' '.format(fileName.split('/')[-1]) + + "${CMAKE_SOURCE_DIR}/3rdParty/openseamap-gl/fonts/" + + '{}\n'.format(fontName)) + +file.write(' \n') +file.write('\n') +file.close() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8da2da502..82c985ea7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,6 +3,7 @@ # configure_file(flightMap.qrc.in flightMap.qrc) +configure_file(${CMAKE_SOURCE_DIR}/generatedSources/flightMap/flightMap-fonts.qrc.in flightMapFonts.qrc) configure_file(icons.qrc.in icons.qrc) configure_file(qml.qrc.in qml.qrc) configure_file(ressources.qrc.in ressources.qrc) @@ -16,96 +17,6 @@ configure_file(text/participate.html.in text/participate.html) configure_file(text/whatsnew.html.in text/whatsnew.html) -# -# Generate PNG versions of the main program icon -# - -add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/metadata/${APP_ID}_angular.png ${CMAKE_BINARY_DIR}/metadata/${APP_ID}.png - DEPENDS ${CMAKE_SOURCE_DIR}/metadata/${APP_ID}.svg ${CMAKE_SOURCE_DIR}/metadata/${APP_ID}_angular.svg - COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/metadata/${APP_ID}_angular.svg -o ${CMAKE_BINARY_DIR}/metadata/${APP_ID}_angular.png -h 512 -w 512 - COMMAND rsvg-convert ${CMAKE_SOURCE_DIR}/metadata/${APP_ID}.svg -o ${CMAKE_BINARY_DIR}/metadata/${APP_ID}.png -h 512 -w 512 - COMMENT "Generate main program icons" - ) - - -# -# Generate PNG versions of the aviation symbols -# - -set(AVIATION_ICONS - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD@2x.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-GLD.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-GLD@2x.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-GRASS.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-GRASS@2x.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-INOP.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-INOP@2x.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-MIL.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-MIL@2x.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-MIL-GRASS.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-MIL-GRASS@2x.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-MIL-PAVED.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-MIL-PAVED@2x.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-PAVED.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-PAVED@2x.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-UL.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-UL@2x.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-WATER.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-WATER@2x.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/MRP.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/MRP@2x.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/NDB.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/NDB@2x.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/RP.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/RP@2x.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/VOR.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/VOR@2x.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/VORDME.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/VORDME@2x.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/VORTAC.png - ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/VORTAC@2x.png - ) -add_custom_command( - OUTPUT ${AVIATION_ICONS} - COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD.png -h 30 -w 30 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD@2x.png -h 60 -w 60 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-GLD.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-GLD.png -h 20 -w 20 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-GLD.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-GLD@2x.png -h 40 -w 40 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-GRASS.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-GRASS.png -h 30 -w 30 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-GRASS.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-GRASS@2x.png -h 60 -w 60 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-INOP.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-INOP.png -h 30 -w 30 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-INOP.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-INOP@2x.png -h 60 -w 60 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-MIL.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-MIL.png -h 30 -w 30 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-MIL.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-MIL@2x.png -h 60 -w 60 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-MIL-GRASS.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-MIL-GRASS.png -h 30 -w 30 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-MIL-GRASS.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-MIL-GRASS@2x.png -h 60 -w 60 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-MIL-PAVED.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-MIL-PAVED.png -h 30 -w 30 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-MIL-PAVED.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-MIL-PAVED@2x.png -h 60 -w 60 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-PAVED.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-PAVED.png -h 30 -w 30 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-PAVED.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-PAVED@2x.png -h 60 -w 60 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-UL.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-UL.png -h 20 -w 20 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-UL.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-UL@2x.png -h 40 -w 40 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-WATER.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-WATER.png -h 30 -w 30 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/AD-WATER.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/AD-WATER@2x.png -h 60 -w 60 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/MRP.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/MRP.png -h 25 -w 25 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/MRP.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/MRP@2x.png -h 50 -w 50 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/NDB.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/NDB.png -h 25 -w 25 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/NDB.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/NDB@2x.png -h 50 -w 50 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/RP.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/RP.png -h 25 -w 25 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/RP.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/RP@2x.png -h 50 -w 50 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/VOR.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/VOR.png -w 22 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/VOR.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/VOR@2x.png -w 44 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/VORDME.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/VORDME.png -w 22 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/VORDME.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/VORDME@2x.png -w 44 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/VORTAC.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/VORTAC.png -w 26 - COMMAND rsvg-convert ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/sprites/VORTAC.svg -o ${CMAKE_CURRENT_BINARY_DIR}/flightMap/sprites/VORTAC@2x.png -w 52 - COMMENT Generating Icons - ) - - # # Set up sources # @@ -113,15 +24,10 @@ add_custom_command( set(SOURCES # Ressources ${CMAKE_CURRENT_BINARY_DIR}/flightMap.qrc - ${flightMapFontsQRC} + ${CMAKE_CURRENT_BINARY_DIR}/flightMapFonts.qrc ${CMAKE_CURRENT_BINARY_DIR}/icons.qrc ${CMAKE_CURRENT_BINARY_DIR}/qml.qrc ${CMAKE_CURRENT_BINARY_DIR}/ressources.qrc - - # List icons here to make sure that they are built - ${AVIATION_ICONS} - ${CMAKE_BINARY_DIR}/metadata/${APP_ID}.png - ${CMAKE_BINARY_DIR}/metadata/${APP_ID}.svg # C++ files Aircraft.cpp diff --git a/src/flightMap.qrc.in b/src/flightMap.qrc.in index cbf5fd575..bb82a5457 100644 --- a/src/flightMap.qrc.in +++ b/src/flightMap.qrc.in @@ -5,38 +5,39 @@ ${CMAKE_CURRENT_SOURCE_DIR}/flightMap/osm-liberty.json - flightMap/sprites/AD.png - flightMap/sprites/AD@2x.png - flightMap/sprites/AD-GLD.png - flightMap/sprites/AD-GLD@2x.png - flightMap/sprites/AD-GRASS.png - flightMap/sprites/AD-GRASS@2x.png - flightMap/sprites/AD-INOP.png - flightMap/sprites/AD-INOP@2x.png - flightMap/sprites/AD-MIL.png - flightMap/sprites/AD-MIL@2x.png - flightMap/sprites/AD-MIL-GRASS.png - flightMap/sprites/AD-MIL-GRASS@2x.png - flightMap/sprites/AD-MIL-PAVED.png - flightMap/sprites/AD-MIL-PAVED@2x.png - flightMap/sprites/AD-PAVED.png - flightMap/sprites/AD-PAVED@2x.png - flightMap/sprites/AD-UL.png - flightMap/sprites/AD-UL@2x.png - flightMap/sprites/AD-WATER.png - flightMap/sprites/AD-WATER@2x.png - flightMap/sprites/MRP.png - flightMap/sprites/MRP@2x.png - flightMap/sprites/NDB.png - flightMap/sprites/NDB@2x.png - flightMap/sprites/RP.png - flightMap/sprites/RP@2x.png - flightMap/sprites/VOR.png - flightMap/sprites/VOR@2x.png - flightMap/sprites/VORDME.png - flightMap/sprites/VORDME@2x.png - flightMap/sprites/VORTAC.png - flightMap/sprites/VORTAC@2x.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD@2x.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-GLD.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-GLD@2x.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-GRASS.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-GRASS@2x.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-INOP.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-INOP@2x.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-MIL.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-MIL@2x.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-MIL-GRASS.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-MIL-GRASS@2x.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-MIL-PAVED.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-MIL-PAVED@2x.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-PAVED.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-PAVED@2x.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-UL.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-UL@2x.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-WATER.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/AD-WATER@2x.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/MRP.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/MRP@2x.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/NDB.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/NDB@2x.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/RP.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/RP@2x.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/VOR.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/VOR@2x.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/VORDME.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/VORDME@2x.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/VORTAC.png + ${CMAKE_SOURCE_DIR}/generatedSources/flightMap/sprites/VORTAC@2x.png + ${CMAKE_CURRENT_SOURCE_DIR}/icons/WhiteBox.png diff --git a/src/icons.qrc.in b/src/icons.qrc.in index 387282b90..62017146d 100644 --- a/src/icons.qrc.in +++ b/src/icons.qrc.in @@ -1,8 +1,8 @@ - ${CMAKE_BINARY_DIR}/metadata/${APP_ID}.svg - ${CMAKE_BINARY_DIR}/metadata/${APP_ID}.png + ${CMAKE_SOURCE_DIR}/metadata/${APP_ID}.svg + ${CMAKE_SOURCE_DIR}/generatedSources/metadata/${APP_ID}.png ${CMAKE_CURRENT_SOURCE_DIR}/icons/ic_speed.svg