[maemo-developers] QtCreator, libraries, and multiple platforms
From: Christian Kandeler christian.kandeler at nokia.comDate: Mon Aug 8 10:55:03 EEST 2011
- Previous message: QtCreator, libraries, and multiple platforms
- Next message: QtCreator, libraries, and multiple platforms
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 2011-08-05 at 16:39 -0400, ext David Talmage wrote: > N900/app > N900/app-uberproject > N900/lib > > The contain, respectively, the app, the subdirs project, and the library. > > I'm building for Maemo, Harmattan, Simulator, and Remote Compiler. In short, > everything but Desktop. > > When I build for Simulator, I get directories > > N900/app-build-simulator > N900/app-uberproject-build-simulator > N900/lib-build-simulator But this is not a SUBDIRS project, is it? If it were, your directory structure would look like this: <my-project-build-simulator/app <my-project-build-simulator/lib <my-project-build-maemo/app <my-project-build-maemo/lib ... Then you could just add "LIBS += -L$$OUT_PWD/../lib -llib" to your application's pro file and the correct library would be found for every platform. > The next challenge is to teach app.pro how to find the library for the build > platform, simulator in the example above. It looks like some hackery-pokery > with replace() will do the job. I was hoping that QMake would Do The Right > Thing for me. Also, if, like you said, there is not a 1:1 mapping between the library and the application, I'd put them into separate projects. Then when you change your library, you just deploy it to your sysroot (for Maemo/Harmattan, don't know about the other platforms) and the linker will find it there when linking the application. Christian
- Previous message: QtCreator, libraries, and multiple platforms
- Next message: QtCreator, libraries, and multiple platforms
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]