Comments (12)
Apologies I was incorrect in my original description, the CMake output structure looks like:
include/osmscout
include/osmscoutclientqt
include/osmscoutmap
include/osmscoutmapqt
In this comment, @Framstag, your meson build would generate an output structure like:
include/libosmscout
include/libosmscout-client-qt
include/libosmscout-map
include/libosmscout-map-qt
This would result in unresolved includes in dependant projects
from libosmscout.
The meson install_headers command has a subdir parameter that allows to fix this.
Example for qt:
install_headers(osmscoutmapqtHeader, subdir : 'libosmscout-map-qt')
results in:
...
Installing /home/tim/projects/libosmscout/libosmscout-map-qt/include/osmscoutmapqt/MapQtImportExport.h to /usr/local/include/libosmscout-map-qt/
...
If you additional add preserve_path : true
, this will result in:
...
Installing /home/tim/projects/libosmscout/libosmscout-map-qt/include/osmscoutmapqt/MapQtImportExport.h to /usr/local/include/libosmscout-map-qt/osmscoutmapqt
...
I'll have to check what the CMake installation does. Both build systems should result to the same structure.
from libosmscout.
It looks like the CMake build does similar (though not for all libraries?):
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/osmscout DESTINATION include FILES_MATCHING PATTERN "*.h" PATTERN "private" EXCLUDE)
@Karry , @jheaff1 : Any opinions against using version two (subdir and preserve) of the meson install above?
from libosmscout.
On Linux, CMake install directory structure looks like this (relative to install prefix):
./bin
./share/osmscout (stylesheets, shaders, fonts, demos, OSMScout2, docs, tests)
./lib/cmake/libosmscout
./include/osmscout
./include/osmscoutimport
./include/osmscoutgpx
./include/osmscoutmap
./include/osmscoutmapagg
./include/osmscoutmapcairo
./include/osmscoutmapopengl
./include/osmscoutmapqt
./include/osmscoutmapsvg
./include/osmscoutclientqt
./include/osmscout-test
So the only problem is that Meson is using directory names with dash, right? Or is there anything wrong on CMake install dir structure?
from libosmscout.
On Linux, CMake install directory structure looks like this (relative to install prefix):
./bin ./share/osmscout (stylesheets, shaders, fonts, demos, OSMScout2, docs, tests) ./lib/cmake/libosmscout ./include/osmscout ./include/osmscoutimport ./include/osmscoutgpx ./include/osmscoutmap ./include/osmscoutmapagg ./include/osmscoutmapcairo ./include/osmscoutmapopengl ./include/osmscoutmapqt ./include/osmscoutmapsvg ./include/osmscoutclientqt ./include/osmscout-test
So the only problem is that Meson is using directory names with dash, right? Or is there anything wrong on CMake install dir structure?
Yeah that's right. The CMake install dir structure is fine, the issue is that the meson install structure has a "lib" prefix and has dashes in the name. It needs to match the CMake install dir structure exactly
from libosmscout.
As you can see from https://mesonbuild.com/Reference-manual_functions.html#install_headers meson is flexible regarding the naming and structure.
The current code in master does not set subdir and uses the default for preserve_path, which is false. This is wrong.
IMHO, we should set preserve_path to true and the value of the subdir attribute should be in line with the cmake files. As I assume this is the dashed subdirectory name I set it accordingly, but seems, I'm wrong. From your input regarding the cmake structure, subdir should stay empty. Correct?
One can easily check what would happen by calling meson install --dry-run
in the build directory. I can make a pull request, just tell me which values you want and will work ;-)
Btw., should the meson build also create *.pc files?
from libosmscout.
Yes, preserve_path: true
helps. But it is supported with Meson 0.63.0 and newer... I also synced installation directories of demos and tests: #1378
from libosmscout.
You mean, it is supported since 0.63.0?
from libosmscout.
Yes, exactly ;-)
from libosmscout.
As you can see from https://mesonbuild.com/Reference-manual_functions.html#install_headers meson is flexible regarding the naming and structure.
The current code in master does not set subdir and uses the default for preserve_path, which is false. This is wrong.
IMHO, we should set preserve_path to true and the value of the subdir attribute should be in line with the cmake files. As I assume this is the dashed subdirectory name I set it accordingly, but seems, I'm wrong. From your input regarding the cmake structure, subdir should stay empty. Correct?
One can easily check what would happen by calling
meson install --dry-run
in the build directory. I can make a pull request, just tell me which values you want and will work ;-)Btw., should the meson build also create *.pc files?
Thank you very much. I'm not familiar with meson so can my really offer any help there, but as long as the output install structure matches that of the cmake build, client applications should be able to include osmscout header files with no issue :
from libosmscout.
The change by @Karry was merged. Can you close the issue, if it was resolved for you?
from libosmscout.
Thank you very much for resolving this issue so quickly!
from libosmscout.
Related Issues (20)
- Why so many build techs? HOT 2
- BoundingBox of imported database too big HOT 6
- What about make Qt 6 the default in CMakelists.txt? HOT 6
- Importing data into an existing database / merging databases HOT 8
- Bounding box and Speed HOT 2
- PlaneMapRenderer redraws map only on center change, not on zoom change HOT 1
- Rendering Maldives lags libosmscout and gives a lot font errors HOT 8
- Rendering way of type "_route" is masked by bridges HOT 6
- Implementing a tile server via libosmcout HOT 7
- Layer rendering issues with tile rendering HOT 1
- Lots of "Warning: Unknown type" HOT 18
- Question regarding RoutingDatabase::GetRouteNodes() HOT 2
- Way missing in MapService query HOT 5
- `MapService::LoadMissingTileData()` produces more data than expected HOT 7
- Missing forest near Swedish national park Muddus HOT 1
- Compilation issues for iOS and XCode 15 HOT 5
- Add libosmscout to Taginfo Projects HOT 2
- Searching for "Zbraslavice 255" in Czechia give no results, but "Zbraslavice Zbraslavice 255" yes
- Compilation error for libosmscout-client on MacOS HOT 3
- Build fails because Config.h isn't installed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libosmscout.