[CMake] how to specify gcc options in CMake?

2011-07-11 Thread Haitao Zhu
Hi All, I am new to CMake and am struggling with a questions. When I compile my programs with the third party libraries, I need to provide gcc with some options as well as paths to include head files and libraries. Usually this is how the gcc command looks like when I use gcc: gcc -Imy_include_fi

Re: [CMake] how to specify gcc options in CMake?

2011-07-11 Thread Nicolas Desprès
Hi, - For the -I options you can use the include_directories() command. - For the -D options you can use the add_definitions() command. - For the linker options you can use the target_link_libraries() command. You can type cmake --help-command in a terminal to read the documentation about how to

[CMake] Test if found library is 32 or 64 bit

2011-07-11 Thread joe
Hi, I've got a seemingly simple question. However, I failed to find an answer up to now. In my FindXXX module, I search a library with help of the find_library command on a 64-bit Linux. Now, I want to check, if the library is 32-bit (built with -m32) or 64-bit. How can I check this? Thanks

Re: [CMake] After updating CMake to 2.8-5, I get ld: framework not found QtGui on Mac OS X (Snow Leopard)

2011-07-11 Thread Clinton Stimpson
On Friday, July 08, 2011 06:11:36 pm NoRulez wrote: > Hi, > > since today the static libraries of my programs will link, but the > executables does not link against Qt libraries, I don't know why. > > The only thing I’ve changed was an update from CMake 2.8-3 to 2.8-5. > > I also tried to instal

Re: [CMake] QT_QTDECLARATIVE_FOUND issue on N9(50)

2011-07-11 Thread Clinton Stimpson
On Sunday, July 10, 2011 05:46:13 am Laszlo Papp wrote: > Hi, > > I made some experiment with this issue and I tried two ideas out: > > 1) I made a cmake_test project folder with two subfolders: foo and > bar. From the main CMakeLists.txt: > add_subdirectory(foo) > add_subdirectory(bar) > > Then

Re: [CMake] Test if found library is 32 or 64 bit

2011-07-11 Thread j s
The /usr/bin/file command on linux can be used to check the file type. ~> file /usr/lib/libpython2.6.so /usr/lib/libpython2.6.so: symbolic link to `libpython2.6.so.1' ~> file /usr/lib/libpython2.6.so.1 /usr/lib/libpython2.6.so.1: symbolic link to `libpython2.6.so.1.0' ~> file /usr/lib/libpython

[CMake] CPack: Bundle Generator and fixup_bundle

2011-07-11 Thread Dominik Schmidt
Hello List! I'm trying to use the Bundle Generator for Mac OS X and am facing the following problem: bundle_fixup() from BundleUtilities would need to be called after generating the app *before* generating the .dmg, but looking at the code of the generator I can't find any way to do so. My

Re: [CMake] CPack: Bundle Generator and fixup_bundle

2011-07-11 Thread Clinton Stimpson
On Monday, July 11, 2011 01:01:24 pm Dominik Schmidt wrote: > Hello List! > > I'm trying to use the Bundle Generator for Mac OS X and am facing the > following problem: > > bundle_fixup() from BundleUtilities would need to be called after > generating the app *before* generating the .dmg, but loo

Re: [CMake] CPack: Bundle Generator and fixup_bundle

2011-07-11 Thread Jean-Christophe Fillion-Robin
Hi Dominik, If I understood properly your problem ... You could have a look at line 40 of https://github.com/Slicer/Slicer/blob/master/SlicerCPack.cmake # HACK - For a given directory, "install(SCRIPT ...)" rule will be evaluated first, # let's make sure the following install rule is evaluat

Re: [CMake] CPack: Bundle Generator and fixup_bundle

2011-07-11 Thread Dominik Schmidt
Hey! First of all: Thanks for your quick replies to both of you! Am 11.07.2011 21:09, schrieb Clinton Stimpson: > Have you considered using the DragNDrop generator instead? Yep, but I want to use the Bundle Generator and I think it should be possible to do so. Of course, there's not much to bu

Re: [CMake] QT_QTDECLARATIVE_FOUND issue on N9(50)

2011-07-11 Thread Laszlo Papp
Hi, > Can you try this with a newer CMake version?  Perhaps the 2.8.5 that just came > out? Same results. How I think I found some interesting thing. It works just fine in this order: find_package(Qt4) if(QT_QTDECLARATIVE_FOUND) add_subdirectory(touch) else(QT_QTDECLARATIVE_F

Re: [CMake] CPack: Bundle Generator and fixup_bundle

2011-07-11 Thread Dominik Schmidt
By the way, I'm on #cmake@freenode as domme if anyone likes to discuss with me there I'm present most of the day (at least until tomorrow evening and again after Sunday) ___ Powered by www.kitware.com Visit other Kitware open-source projects at http

[CMake] Magical transformation of /path/to/libmylib.so to -lmylib

2011-07-11 Thread Jens Mueller
Hi, I'm trying to figure out where the path for a found library is changed. In my case Curses is found at /usr/lib/libcurses.so. When linking with gcc "/usr/lib/libcurses.so" is replaced by "-lcurses" as it is specified at http://www.cmake.org/Wiki/CMake_2.6_Notes#Linking_to_System_Libraries. Wher

Re: [CMake] Magical transformation of /path/to/libmylib.so to -lmylib

2011-07-11 Thread Andreas Pakulat
On 11.07.11 23:34:37, Jens Mueller wrote: > Hi, > > I'm trying to figure out where the path for a found library is changed. > In my case Curses is found at /usr/lib/libcurses.so. When linking with > gcc "/usr/lib/libcurses.so" is replaced by "-lcurses" as it is specified > at http://www.cmake.org/

Re: [CMake] Install Command Line Links Failed

2011-07-11 Thread Scott Napier
What may have fixed it is deleting 6 aliases (hidden) and then installing the software - you must have to do this anytime you change a version. ccmake cmake cmake-gui cmakexbuild cpack ctest ___ Powered by www.

Re: [CMake] Magical transformation of /path/to/libmylib.so to -lmylib

2011-07-11 Thread Michael Hertling
On 07/11/2011 11:34 PM, Jens Mueller wrote: > Hi, > > I'm trying to figure out where the path for a found library is changed. > In my case Curses is found at /usr/lib/libcurses.so. When linking with > gcc "/usr/lib/libcurses.so" is replaced by "-lcurses" as it is specified > at http://www.cmake.or

[CMake] Multiple install section from the same base folder

2011-07-11 Thread Laszlo Papp
Hi, I have just realized this snippet in my CMakeLists.txt file: install(FILES atticamanager.h authentication.h DESTINATION ${INCLUDE_INSTALL_DIR}/gluon/player/lib COMPONENT Devel ) install(FILES archive/archive.h DESTINATION ${INCLUDE_INSTALL_DIR}/gluon/player/lib/arch

Re: [CMake] Multiple install section from the same base folder

2011-07-11 Thread Andreas Naumann
You could use file(GLOB_RECURSE files *.h) or install the main directory with install(DIRECTORY ... ) and exclude every non-header file (and possibly svn..) Andreas Am 12.07.2011 05:04, schrieb Laszlo Papp: Hi, I have just realized this snippet in my CMakeLists.txt file: install(FILES

Re: [CMake] Multiple install section from the same base folder

2011-07-11 Thread Laszlo Papp
Hi, On Tue, Jul 12, 2011 at 9:03 AM, Andreas Naumann wrote: > You could use > file(GLOB_RECURSE files *.h) The problem is a bit slightly different. It is not a problem for me to find the files on my own. :) The problem is that I would like to install "foo/bar.h" into the destination as "foo/bar.