Coder Social home page Coder Social logo

Comments (3)

McMartin avatar McMartin commented on July 22, 2024

@hsetlik What you want to do is totally possible, and there are a few ways of doing it. The most straightforward way is to call jucer_appconfig_header once per-platform, for instance:

if(APPLE)
  jucer_appconfig_header(USER_CODE_SECTION "#define PLATFORM_COLOR \"Red\"")
elseif(WIN32)
  jucer_appconfig_header(USER_CODE_SECTION "#define PLATFORM_COLOR \"Blue\"")
else()
  message(FATAL_ERROR "Unsupported platform")
endif()

You can also define a variable (or several) depending on the platform and call jucer_appconfig_header with that variable, for instance:

if(APPLE)
  set(platform_color "Red")
elseif(WIN32)
  set(platform_color "Blue")
else()
  message(FATAL_ERROR "Unsupported platform")
endif()
jucer_appconfig_header(USER_CODE_SECTION "#define PLATFORM_COLOR \"${platform_color}\"")

I hope this helps!

from frut.

hsetlik avatar hsetlik commented on July 22, 2024

Oh thank you! I ended up just making a command like argument to set the platform but glad to know about the APPLE and WIN32 variables.

from frut.

McMartin avatar McMartin commented on July 22, 2024

Since it seems I have answered your question, I'll close the issue. Feel free to open a new one if you have another question on using FRUT.

from frut.

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.