Comments (4)
Thanks for the information, I hear about CMAKE_<CONFIG>_POSTFIX
for the first time. I have a few questions, however:
- What is the exact use case? I suppose this is done so the debug, dynamic and static libraries can coexist and the user would be able to select between them when calling
find_package(Magnum)
. - Static and dynamic libraries are (at least on Linux and Windows, don't know about OSX) differentiated by extension (e.g.
.a
and.so
), so they can coexist (although CMake is hardcoded to use the dynamic one by default). But the information about how the library is built is saved inmagnumConfigure.h
asMAGNUM_BUILD_STATIC
preprocessor definiton and thus the include files for these two versions would need to be installed to separate locations to avoid conflicts anyway. - How is the postfix handled when finding the library using
find_library()
(i.e. fromFindMagnum.cmake
)? I suppose that justfind_library(Magnum)
won't simply be able to findlibMagnum_d_s.so
. More importantly, how would the user request specific library version fromfind_package()
? Documentation forfind_library()
andfind_package()
doesn't mention anything which would help in this case.
from magnum.
What is the exact use case? I suppose this is done so the debug, dynamic and static libraries can coexist and the user would be able to select between them when calling find_package(Magnum).
To explicitly statically link or dynamically link. And also to explicitly determine which type of binary to link to for debug and release builds.
How is the postfix handled when finding the library using find_library() (i.e. from FindMagnum.cmake)? I suppose that just find_library(Magnum) won't simply be able to find libMagnum_d_s.so. More importantly, how would the user request specific library version from find_package()? Documentation for find_library() and find_package() doesn't mention anything which would help in this case.
I'm actually not sure, but SFML does use _s and _d (or -d/-s, not sure) suffixes in it's library and it does use CMake. https://github.com/LaurentGomila/SFML/blob/master/cmake/Modules/FindSFML.cmake
from magnum.
Thanks for the SFML example, I will look into it.
from magnum.
Debug/release library distinction is done as discussed in #45. Thanks again for the SFML module, it was very helpful.
On the other hand, static/dynamic libraries cannot coexist because of the reason mentioned above (different generated include file), thus they still need to be installed to (and later found in) separate location and that is nothing the build system could possibly help with.
from magnum.
Related Issues (20)
- MacOS: GlfwApplication.cpp::currentGlfwModifiers wrongly detects modifiers in mouseMoveEvent HOT 7
- magnum example code can't find SDL2 file HOT 2
- CorradeMain.lib - unresolved external symbol main HOT 3
- Provide a passthrough access to image data from scene importers HOT 1
- Update vcpkg packages to include EmscriptenApplication on Emscripten HOT 2
- Failing to link Magnum::Math? HOT 3
- few compile warnings HOT 1
- How to point to a local installation of `corrade` without using the bootstrap project? HOT 3
- undefined symbol: flextGLInit HOT 4
- Image rendered in gray since 1847c72 HOT 18
- Emscripten 3.1.21+ crashes EmscriptenApplication: "AsciiToString is not defined" HOT 4
- How to build from source on MSYS2 MINGW64? HOT 1
- keyReleaseEvent not triggered after printscreen on OSX HOT 6
- Conversion from CubicHermite to Bezier is wrong
- Mixing with raw openGL calls and Context::current().resetState() HOT 3
- C Bindings HOT 5
- WebGPU backend HOT 2
- Parallel rendering with glb files HOT 5
- Conflict with near and far Macros When Including WinSock2.h After Matrix4.h HOT 2
- emsdk compile error: typedef redefinition with different types HOT 4
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 magnum.