Re: [CMake] Mac bundled application with multiple executables.

2014-02-11 Thread NoRulez
You can use add_custom_command as POST_BUILD step and TargetGenerators for the 
main GUI bundle to do what you want.

Best Regards

> Am 09.02.2014 um 23:56 schrieb Andreas Pakulat :
> 
> Hi Bill,
> 
>> On Sun, Feb 9, 2014 at 8:45 PM, Bill Somerville  wrote:
>> Hi,
>> 
>> noob here so firstly thanks for the great build tools!
>> 
>> I'm struggling with shoehorning a Win32/Linux Qt GUI application into CMake 
>> for those targets and for OS-X.
>> 
>> At the moment the Mac build is manually transformed into an OS-X app bundle. 
>> I am making some progress getting it to install (and package, for 
>> deployment) directly into a bundle format. Using MACOSX_BUNDLE on the main 
>> GUI executable target plus the required CMake variable declarations.
>> 
>> What I am stuck with is how to include another executable in the app bundle. 
>> It is a console type program that is spawned from the GUI to do some 
>> background work. Although it can be run standalone from the console, its 
>> purpose is to be run by the GUI program. Therefore it belongs in the bundle.
>> 
>> What incantation do I need to give CMake to get this executable into the 
>> bundle installation. It is built as a target by the same CMake script as the 
>> GUI executable.
> 
> This is how CMake itself is shipped on MacOSX (the bundle starts the qt gui 
> and contains the console gui as well as the various cli tools like cmake, 
> ctest etc. So you may want to look into CMake's own buildsystem files for 
> that, IIRC the cmake buildsystem wasn't that hard to understand and follow.
> 
> Andreas 
> -- 
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-02-11 Thread Marcel Loose
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

op 10-02-14 13:38, David Cole schreef:
>> Should I file this as a bug in the issue tracker then?
> 
> 
> Sure. Especially if you have an easy way to reproduce. (Either
> reference an external, publicly available project we can "just
> build" and get it to happen, or attach a CMakeLists that
> demonstrates the issue if possible.)
> 
> That way, we can reproduce it ourselves, and verify that any fix
> we propose actually improves the situation for the reproduce case.
> 
> 
> Thanks, David C.
> 
Hi David,

For what it's worth. This problem is related to another issue I
reported: http://public.kitware.com/Bug/view.php?id=14094. Here I also
got a quite long, but still manageable list of include directories.

Regards,
Marcel Loose.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS+q1tAAoJEEpMyb1AIWdYF4IH/39GG3zfrq9wn3SWpDG2Vu1v
Ce1EGrEIP4r7K10S0rhhEqXaYw7u/WWkp9NztaL/hilhJFP4MsdmJHkG+5TP3F+z
FbiK8mGfZ3llrZT2MHDuQXWI50hBaZlyof1Xiabrww37zEtaOhMvBKRnVfn7oI2b
KBF1k/jOOVM2/Z/RBJzdf1oHKHDgbk/ue7MVpSTTuwNndpryDkAYFy+9ettG1hLv
pLWVP3zzV/xwxOUf44f6Fu6KQ9UhD8Qf1HmDSbaR4fBr+ARxhdU5cckrnjY0Wiyk
dALtDFi24N3BPp7ZMHwlB1h0ujMrfJxdb7YDHADK8KM9HIGqpLlMkQbaegjuAY8=
=8JWY
-END PGP SIGNATURE-
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake and Framework/CFBundle Support

2014-02-11 Thread clinton
- Original Message -

> Hello,

> I don't know if I overlook something or the framework/CFBundle support on Mac
> OS is rarely.

> Most of the things I have already implemented as post-build commands but are
> there also CMake ways of doing such things?

> .) Adding resources to CFBundles? (Resources for frameworks are supported)
> .) Creating PkgInfo files in CFBundles
> .) Copying custom Info.plist files to CFBundles

With an exception of the 3rd one, I don't think there is a CMake way of doing 
those except with post-build commands. 
For the custom Info.plist, have you tried setting the MACOSX_BUNDLE_INFO_PLIST 
property on the target? 

Clint 
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Dependencies

2014-02-11 Thread Phil Smith
I owe you a beer! Thank you. Many, many hours saved here. And of course yeah, I 
feel dumb for not having grokked in fullness.

/me starts the day on a high note

From: Petr Kmoch [mailto:petr.km...@gmail.com]
Sent: Tuesday, February 11, 2014 1:57 AM
To: Phil Smith
Cc: cmake@cmake.org
Subject: Re: [CMake] Dependencies

Quoting the documentation of OBJECT_DEPENDS:

  Specifies a semicolon-separated list of full-paths to files on which any 
object files compiled from this source file depend.
Notice the "full-paths" bit. You're not providing a full path. You must make 
the path absolute; you can probably prefix it with an appropriate selection 
from ${CMAKE_SOURCE_DIR}, ${CMAKE_CURRENT_SOURCE_DIR}, ${CMAKE_BINARY_DIR}, 
${CMAKE_CURRENT_BINARY_DIR}, ${CMAKE_CURRENT_LIST_DIR} or similar variables.

Petr

On Tue, Feb 11, 2014 at 1:12 AM, Phil Smith 
mailto:p...@voltage.com>> wrote:
Can I bother you to look at my CMakeLists.txt and see if you see why the
set_property(SOURCE VSHVOLT.asm APPEND PROPERTY OBJECT_DEPENDS 
src/zprotect/asm/VSHVOLTX.mac)

on line 385 doesn't seem to be "taking"?

What I do is a CMake, then I edit VSHVOLTX.mac and save it, and another CMake. 
Nothing gets built. VSHVOLT.asm should get reassembled.

This is driving me crazy...

From: Petr Kmoch [mailto:petr.km...@gmail.com]
Sent: Wednesday, February 05, 2014 12:08 AM

To: Phil Smith
Cc: cmake@cmake.org
Subject: Re: [CMake] Dependencies

Hi Phil.


If your FOO.asm is used as a source file (i.e. it's listed in an 
add_executable() or add_library() command), then you can use the source file 
property OBJECT_DEPENDS for that:
  add_executable(myexe FOO.asm other.file one.more)
  set_property(SOURCE FOO.asm PROPERTY OBJECT_DEPENDS BAR.mac BAZ.mac) #any 
list of dependencies here
As an alternative to set_property(), you can use the weaker, but shorthand 
setter set_source_files_properties() (which can set it for multiple files at 
once).

If they're somehow processed with a custom command/target (i.e. via 
add_custom_command() or add_custom_target() instead of library/executable), you 
can use that command's DEPENDS argument.
Petr

On Tue, Feb 4, 2014 at 7:57 PM, Phil Smith 
mailto:p...@voltage.com>> wrote:
This is surely something basic, but I'm far from a CMake guru and would rather 
not spend weeks digging to solve something that *seems* like it'll be simple.

We have assembler modules in a project. These use macros, as assembler modules 
are wont to do.

So if module FOO.asm uses macro BAR.mac, and we change BAR, a CMake should 
rebuild FOO. We recognize that we're going to have to define these dependencies 
manually, but I'm assuming/hoping that there's a way to do that in a CMakeLists.

Unfortunately words like "dependency" make lousy search terms!

Can someone point me? Or, even better, give me an example of how to say 
"FOO.asm depends on macro BAR.mac"?

Thanks...
--
...phsiii

Phil Smith III

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Dependencies

2014-02-11 Thread Petr Kmoch
Quoting the documentation of OBJECT_DEPENDS:

  Specifies a semicolon-separated list of full-paths to files on which any
object files compiled from this source file depend.

Notice the "full-paths" bit. You're not providing a full path. You must
make the path absolute; you can probably prefix it with an appropriate
selection from ${CMAKE_SOURCE_DIR}, ${CMAKE_CURRENT_SOURCE_DIR},
${CMAKE_BINARY_DIR}, ${CMAKE_CURRENT_BINARY_DIR}, ${CMAKE_CURRENT_LIST_DIR}
or similar variables.

Petr


On Tue, Feb 11, 2014 at 1:12 AM, Phil Smith  wrote:

> Can I bother you to look at my CMakeLists.txt and see if you see why the
>
> *set_property(SOURCE VSHVOLT.asm APPEND PROPERTY OBJECT_DEPENDS
> src/zprotect/asm/VSHVOLTX.mac)*
>
>
>
> on line 385 doesn't seem to be "taking"?
>
>
>
> What I do is a CMake, then I edit VSHVOLTX.mac and save it, and another
> CMake. Nothing gets built. VSHVOLT.asm should get reassembled.
>
>
>
> This is driving me crazy...
>
>
>
> *From:* Petr Kmoch [mailto:petr.km...@gmail.com]
> *Sent:* Wednesday, February 05, 2014 12:08 AM
>
> *To:* Phil Smith
> *Cc:* cmake@cmake.org
> *Subject:* Re: [CMake] Dependencies
>
>
>
> Hi Phil.
>
>
> If your FOO.asm is used as a source file (i.e. it's listed in an
> add_executable() or add_library() command), then you can use the source
> file property OBJECT_DEPENDS for that:
>
>   add_executable(myexe FOO.asm other.file one.more)
>
>   set_property(SOURCE FOO.asm PROPERTY OBJECT_DEPENDS BAR.mac BAZ.mac)
> #any list of dependencies here
>
> As an alternative to set_property(), you can use the weaker, but shorthand
> setter set_source_files_properties() (which can set it for multiple files
> at once).
>
>
>
> If they're somehow processed with a custom command/target (i.e. via
> add_custom_command() or add_custom_target() instead of library/executable),
> you can use that command's DEPENDS argument.
>
> Petr
>
>
>
> On Tue, Feb 4, 2014 at 7:57 PM, Phil Smith  wrote:
>
> This is surely something basic, but I'm far from a CMake guru and would
> rather not spend weeks digging to solve something that **seems** like
> it'll be simple.
>
>
>
> We have assembler modules in a project. These use macros, as assembler
> modules are wont to do.
>
>
>
> So if module FOO.asm uses macro BAR.mac, and we change BAR, a CMake should
> rebuild FOO. We recognize that we're going to have to define these
> dependencies manually, but I'm assuming/hoping that there's a way to do
> that in a CMakeLists.
>
>
>
> Unfortunately words like "dependency" make lousy search terms!
>
>
>
> Can someone point me? Or, even better, give me an example of how to say
> "FOO.asm depends on macro BAR.mac"?
>
>
>
> Thanks...
>
> --
>
> ...phsiii
>
>
>
> Phil Smith III
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
>
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake