Giter Site home page Giter Site logo

Comments (4)

vector-of-bool avatar vector-of-bool commented on August 18, 2024 1

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.

vector-of-bool avatar vector-of-bool commented on August 18, 2024

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.

Scindix avatar Scindix commented on August 18, 2024

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.

vector-of-bool avatar vector-of-bool commented on August 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.