Comments (4)
Interesting...
I'll keep this issue open so that I can go back and commit the fix, and also set cmake_minimum_required
to a reasonable version so that this can be avoided in the future.
from cmrc.
CMRC uses a global table (unforuntate. I've thought about changing this approach) to store the resource file pointers. The CMRC_INIT
call initializes the table entries for the named resource library so that cmrc::open
will load them correctly.
There are a few potential problems, and I'd be curious to see what's gone wrong. My biggest hypothesis: There isn't a single global table that it is using. If the table
in table.emplace
is not the same table used in cmrc::open
, they won't be able to see each other. This might happen if the linker is doing something unexpected.
Might you be able to attach a debugger and break into the CMRC_INIT
call?
In the future, a better approach might involve not using a global table.
from cmrc.
I found the source of the error.
Android Studio uses gradle scripts to compile an app. However these scripts don't output any messages from CMake (which is extremely annoying).
If you want to see messages and warnings you have to invoke "cmake ." and "make" by hand in a terminal. Which is what I did and which created mentioned files that are totally correct.
However if I want to create an executable apk for android I need to run the gradle scripts and they are using their own copy of cmake. It seems that "3.6.0-rc2" is the maximum allowed version.
However that version of cmake doesn't support the "PARSE_ARGV" signature of "cmake_parse_arguments". (See cmake documentation)
So changing this line:
cmake_parse_arguments(PARSE_ARGV 1 ARG "${options}" "${args}" "${list_args}")
to
cmake_parse_arguments(ARG "${options}" "${args}" "${list_args}" "${ARGN}")
fixed it for me.
from cmrc.
It's been a while, but this should work now in older CMake versions. I've added a cmake_minimum_required()
to enforce a minimum version.
from cmrc.
Related Issues (20)
- Split C++ source from CMake files
- linking cmrc with a shared library HOT 6
- [Wishlist] Allow nested namespaces
- Failing to compile with GLSL shaders HOT 1
- Can you provide an install target on top level CMakelists.txt HOT 1
- std::string_view API on file HOT 4
- Undefined reference to get_filesystem() HOT 4
- Making the cmrc-generated resource libraries install-friendly HOT 2
- Generate `OBJECT` library instead of `STATIC` HOT 1
- Build failed(Error C1060) with big resource files. HOT 5
- #include <cmrc/cmrc.hpp> HOT 1
- Call "cmrc_add_resources" in sub directory HOT 1
- Adding ouputs of other targets as the inputs to a resource libary target HOT 4
- How do I embed my file into an executable and how do I retrieve my resources from it? HOT 6
- Specify include directories as system includes
- #include <cmrc/cmrc.hpp> never finds the include file
- add an option to encrypt a resource HOT 5
- Constexpr
- clangd-lsp does not recognize header files
- Using CMakeRC file objects with std::istream 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 cmrc.