Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator + SDL same projects different targets(Debian and Raspberry)

QtCreator + SDL same projects different targets(Debian and Raspberry)

Scheduled Pinned Locked Moved Qt Creator and other tools
cross compilepro filecross platformqtcreatorraspberry
2 Posts 2 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alkzx
    wrote on 16 Mar 2015, 08:52 last edited by alkzx
    #1

    I'm developing an application that uses SDL Libraries using QtCreator as IDE. My end target is Raspberry Pi but I've already configured a cross compiler to work on Debian.

    My aim is to have the same project and just switch target on QtCreator, I've already configured kits for both platforms and even added the Raspberry Pi as device on QtCreator.

    The point is that I don't know what to write into the .pro file to include different libs/includes and defines based in the target, here's a small piece of the .pro file:

    whathere? # RaspBerry
    	   {
    	   LIBS += -L/raspberry/SDL_pi/lib/ -lSDL2 -lSDL2_image
    	   INCLUDEPATH = /raspberry/SDL_pi/include
    	   DEFINES += RASPI
    	   }
    whathere?
    	   {
    	   LIBS += -L/usr/local/lib/ -lSDL2 -lSDL2_image
    	   INCLUDEPATH = /usr/local/include
    	   DEFINES += LINUX
    	   }
    

    Thank you in advance.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 16 Mar 2015, 09:46 last edited by
      #2

      You can put the name of mkspec you are used for the given platform. I think for Raspberry it's something like linux-rasp-pi-g++. Open the mkspecs/devices folder in your Qt installation and check it out or open the Kits propertties page in Qt Creator and see which mkspec your kits are using.

      1 Reply Last reply
      0

      2/2

      16 Mar 2015, 09:46

      • Login

      • Login or register to search.
      2 out of 2
      • First post
        2/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved