[CMake] Different linker-init options depending of the build type

2010-04-15 Thread Matthias Goesswein

Hello!

I'm currently porting to a new platform (Fujitsu LX16 Microcontrollers) 
and i found following flag-variables:


CMAKE_C_FLAGS_INIT
CMAKE_C_FLAGS_DEBUG_INIT
CMAKE_C_FLAGS_MINSIZEREL_INIT
CMAKE_C_FLAGS_RELWITHDEBINFO_INIT

But in the Modules which are shipped with CMake i only found

CMAKE_EXE_LINKER_FLAGS_INIT

as flag variable for the linker.

Are

CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT
... etc.

also possible and working?

Another question:

Are there any Init-flag-variables for static libraries too?

Cheers,
Matthias.




___
Powered by www.kitware.com

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

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

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


[CMake] SubProject configuration in same build as host

2010-04-15 Thread Biddiscombe, John A.
Within paraview we wish to build hdf5, which is now cmake based, so we 
ADD_SUBDIRECTORY(blah) and hdf5 is compiled nicely with lib targets added to 
the build.

Some settings (like lib names) are needed by the host project, so we want to
SET(HDF5_CONFIG ${ParaView_BINARY_DIR}/Utilities/hdf5-1.8/HDF5-config.cmake)
INCLUDE(${HDF5_CONFIG})

But this file - which is generated for us by cmake and placed in the build tree 
- has contents like
# Create imported target vtkhdf5
ADD_LIBRARY(vtkhdf5 SHARED IMPORTED)

And naturally if I include this inside the host project build - it complains 
that vtkhdf5 can't be added as an imported library as it is already a target in 
the main build - created when I did add_subdirectoy for the hdf5 source.

Is there a similar functionality, other than the 'old style' configure_file 
command to generate a bunch of settings that can be picked up by the host 
project. I had the impression that the new project import/export/install stuff 
was designed to make this sort of thing more automated, but I think I'm missing 
a piece of the puzzle.

thanks

JB

--
John Biddiscombe,email:biddisco @ cscs.ch
http://www.cscs.ch/
CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland  | Fax:  +41 (91) 610.82.82

___
Powered by www.kitware.com

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

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

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

[CMake] CPack NSIS problem

2010-04-15 Thread Robert Bielik

I'm trying to get an icon to show in Windows Programs and features, registry should 
contain a DisplayIcon entry pointing to the icon
to show. But CPack generates only:

 ; Optional registration
 Push DisplayIcon
 Push $INSTDIR\
 Call ConditionalAddToRegisty

which of course will make Programs and features show no icon at all. So the question is, how do I tell CPack to create 
a correct path ?


TIA
/Rob
___
Powered by www.kitware.com

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

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

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


Re: [CMake] SubProject configuration in same build as host

2010-04-15 Thread Dave Partyka
Just thinking out loud but we could make an external_project call instead.
This would sync, configure, build and install it easily without needing to
override anything. And then ParaView would just FindPackage(HDF5) with the
internal build directory as a hint.

On Thu, Apr 15, 2010 at 5:40 AM, Biddiscombe, John A. biddi...@cscs.chwrote:

  Within paraview we wish to build hdf5, which is now cmake based, so we
 ADD_SUBDIRECTORY(blah) and hdf5 is compiled nicely with lib targets added to
 the build.



 Some settings (like lib names) are needed by the host project, so we want
 to

 *SET(HDF5_CONFIG
 ${ParaView_BINARY_DIR}/Utilities/hdf5-1.8/HDF5-config.cmake)*

 *INCLUDE(${HDF5_CONFIG})*



 But this file – which is generated for us by cmake and placed in the build
 tree – has contents like

 *# Create imported target vtkhdf5*

 *ADD_LIBRARY(vtkhdf5 SHARED IMPORTED) *

 * *

 And naturally if I include this inside the host project build – it
 complains that vtkhdf5 can’t be added as an imported library as it is
 already a target in the main build – created when I did add_subdirectoy for
 the hdf5 source.



 Is there a similar functionality, other than the ‘old style’ configure_file
 command to generate a bunch of settings that can be picked up by the host
 project. I had the impression that the new project import/export/install
 stuff was designed to make this sort of thing more automated, but I think
 I’m missing a piece of the puzzle.**

 * *

 thanks



 JB

 * *

 --

 John Biddiscombe,email:biddisco @ cscs.ch

 http://www.cscs.ch/

 CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07

 Via Cantonale, 6928 Manno, Switzerland  | Fax:  +41 (91) 610.82.82



 ___
 Powered by www.kitware.com

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

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

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

___
Powered by www.kitware.com

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

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

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

[CMake] FindKDE4Internal error

2010-04-15 Thread Alexander Dietz
Hi,

I was trying to install kile, which uses cmake for the installation
process. But the installation failed, I get the following error:


CMake Error at /usr/local/share/cmake-2.8/Modules/FindKDE4.cmake:98 (MESSAGE):
 ERROR: cmake/modules/FindKDE4Internal.cmake not found in
 /home/alex/.kde/share/apps;/usr/share/kde-settings/kde-profile/default/share/apps;/usr/share/kde4/apps
Call Stack (most recent call first):
 CMakeLists.txt:5 (find_package)


I am using kde 4.4.1 and I also searched for the error on the net. The
most suggestions were to install things like kdelibs, kdelibs4-core
and/or libkde4-devel , which did not solve the problem. yum install
told me:


Package 6:kdelibs-4.4.1-6.fc12.i686 already installed and latest version
No package kdelibs4-core available.
No package libkde4-devel available.


Any idea what I can try to get cmake running?


Thanks
 Alex
___
Powered by www.kitware.com

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

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

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


Re: [CMake] Why not showing date/time for each operation in VERBOSE=1 mode?

2010-04-15 Thread Pavel Shevaev
 Could you change the compiler from gcc to 'time gcc'?

 Additionally perhaps specifying add_custom_command for relevant targets with
 PRE_BUILD and POST_BUILD calls to 'date' would be helpful.


Thanks for these nice ideas :)

-- 
Best regards, Pavel
___
Powered by www.kitware.com

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

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

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


Re: [CMake] FindKDE4Internal error

2010-04-15 Thread Andreas Pakulat
On 15.04.10 13:05:47, Alexander Dietz wrote:
 Hi,
 
 I was trying to install kile, which uses cmake for the installation
 process. But the installation failed, I get the following error:
 
 
 CMake Error at /usr/local/share/cmake-2.8/Modules/FindKDE4.cmake:98 (MESSAGE):
  ERROR: cmake/modules/FindKDE4Internal.cmake not found in
  /home/alex/.kde/share/apps;/usr/share/kde-settings/kde-profile/default/share/apps;/usr/share/kde4/apps
 Call Stack (most recent call first):
  CMakeLists.txt:5 (find_package)
 
 
 I am using kde 4.4.1 and I also searched for the error on the net. The
 most suggestions were to install things like kdelibs, kdelibs4-core
 and/or libkde4-devel , which did not solve the problem. yum install
 told me:
 
 
 Package 6:kdelibs-4.4.1-6.fc12.i686 already installed and latest version
 No package kdelibs4-core available.
 No package libkde4-devel available.
 
 
 Any idea what I can try to get cmake running?

Install whatever development package contains FindKDE4Internal.cmake.
Apparently you're lacking that file on your system (or is it there
actually, just in a non-standard path?). I can't give you the exact package
name as I'm not using Fedora, but something with kdelibs and dev in the
name should suffice. Doesn't yum have a way to search in which package a
given file resides?

Andreas

-- 
Tonight's the night: Sleep in a eucalyptus tree.
___
Powered by www.kitware.com

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

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

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


Re: [CMake] CPack NSIS problem

2010-04-15 Thread Robert Bielik

Robert Bielik skrev:
which of course will make Programs and features show no icon at all. 
So the question is, how do I tell CPack to create a correct path ?


I tried look at the code base, but I fail to find where CPack generates NSIS 
files, couldn't
find anything about DisplayIcon in CPacks NSIS generator. Are there some 
template NSIS files used?
If so, where?

/Rob
___
Powered by www.kitware.com

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

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

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


Re: [CMake] CPack NSIS problem

2010-04-15 Thread Bill Hoffman

Robert Bielik wrote:

Robert Bielik skrev:
which of course will make Programs and features show no icon at all. 
So the question is, how do I tell CPack to create a correct path ?


I tried look at the code base, but I fail to find where CPack generates 
NSIS files, couldn't
find anything about DisplayIcon in CPacks NSIS generator. Are there some 
template NSIS files used?

If so, where?


Modules/NSIS.InstallOptions.ini.in and Modules/NSIS.template.in

___
Powered by www.kitware.com

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

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

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


[CMake] nomenclature question

2010-04-15 Thread lux-integ
Greetings,

I am new to the list.

I am having difficulty compiling kdebase-workspace-4.4.2  on on a pure-64-bit 
linux (kernel-2.6.33) setup.  I already   described details of the problem ( 
http://mail.kde.org/pipermail/kde-buildsystem/2010-April/006863.html ).

Basically I do not have Xorg-7.5 in /usr and although some X-libraries are 
found   quite a few are not  ( For example  trawling through build/cmake  
revealed (not just for libXi which aborted the compilation) the following):-

  excerpts  from build/CMakeError.log ##


/usr/bin/gcc  -m64   -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align 
-Werror-implicit-function-declaration -Wchar-subscripts -Wall -W 
-Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute 
-fno-common  -DCHECK_FUNCTION_EXISTS=XkbLockModifiers   
CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o  -o 
cmTryCompileExec -rdynamic -lX11 /usr/X11R7.5/lib64/libSM.so 
/usr/X11R7.5/lib64/libICE.so /usr/X11R7.5/lib64/libX11.so 
/usr/X11R7.5/lib64/libXext.so /usr/X11R7.5/lib64/libXft.so 
/usr/X11R7.5/lib64/libXau.so /usr/X11R7.5/lib64/libXdmcp.so 
/usr/X11R7.5/lib64/libXpm.so -Wl,-rpath,/usr/X11R7.5/lib64 
/usr/bin/ld: cannot find -lX11

/usr/bin/gcc  -m64   -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align 
-Werror-implicit-function-declaration -Wchar-subscripts -Wall -W 
-Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute 
-fno-common  -DCHECK_FUNCTION_EXISTS=XF86MiscSetGrabKeysState   
CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o  -o 
cmTryCompileExec -rdynamic -lXxf86misc 
/usr/bin/ld: cannot find -lXxf86misc

/usr/bin/gcc  -m64   -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align 
-Werror-implicit-function-declaration -Wchar-subscripts -Wall -W 
-Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute 
-fno-common  -DCHECK_FUNCTION_EXISTS=_IceTransNoListen   
CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o  -o 
cmTryCompileExec -rdynamic -lICE 
/usr/bin/ld: cannot find -lICE

/usr/bin/gcc  -m64   -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align 
-Werror-implicit-function-declaration -Wchar-subscripts -Wall -W 
-Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute 
-fno-common  -DCHECK_FUNCTION_EXISTS=glXChooseVisual   
CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o  -o 
cmTryCompileExec -rdynamic -lGL 
/usr/bin/ld: cannot find -lGL

/usr/bin/gcc  -m64   -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align 
-Werror-implicit-function-declaration -Wchar-subscripts -Wall -W 
-Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute 
-fno-common  -DCHECK_FUNCTION_EXISTS=XScreenSaverQueryInfo   
CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o  -o 
cmTryCompileExec -rdynamic -lXss 
/usr/bin/ld: cannot find -lXss

/usr/bin/gcc  -m64   -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align 
-Werror-implicit-function-declaration -Wchar-subscripts -Wall -W 
-Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute 
-fno-common  -DCHECK_FUNCTION_EXISTS=_XiGetDevicePresenceNotifyEvent   
CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o  -o 
cmTryCompileExec -rdynamic -lXi 
/usr/bin/ld: cannot find -lXi



I   therefore am planning to have a go at using the techniques described here  
for Imagemagick  ( http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries  )  
to find the required xlibraries. I have two sets of questions:-

SET A:-
I do not know the 'names' used by kde/cmake to describe these  'packages' 

a) is it the library name  such as lX11, lXxf86misc, lICE, lGL, lXi  or are 
these prefixed by lib such as libX11, libXxf86misc, libICE, libGL, libXi ?
b) is in the 'package.config' name such as xi.pc etc ?
c) is it something else and if so what is it?

SET B:-
I do not know how pkgconfig is called by cmake  nor the search path for *.pc 
files   are handled by cmake   though I have tried reading the cmake online 
manual  Thus:-

a) is there an Environmental_variable  setting for  PkgConfigPath for cmake 
and if so what is it? OR
b) does cmake rely on the $PKG_CONFIG_PATH variable setting   in /etc/profile?
c) how is pkgconfig  called in cmake?  -is with package name (i.e. *.pc ) (or 
otherwise -and what is returned?

 
Replies would be appreciated.

sincerely

lux-integ
___
Powered by www.kitware.com

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

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

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


[CMake] Assembler flag support

2010-04-15 Thread Matthias Goesswein

Hello!

Is there a variable like CMAKE_C_FLAGS_INIT for the assembler available?

(e.g. CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT)

Which flags are passed to FLAGS in the Rule variable for creating an 
object file from an assembler source:


SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT 
CMAKE_ASM${ASM_DIALECT}_COMPILER FLAGS -o OBJECT SOURCE)


I'm using CMake 2.8.1.

Cheers,
Matthias.

___
Powered by www.kitware.com

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

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

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


Re: [CMake] CPack NSIS problem

2010-04-15 Thread Robert Bielik

Bill Hoffman skrev:

Modules/NSIS.InstallOptions.ini.in and Modules/NSIS.template.in



Thnx Bill, exactly what I need.

/Rob


___
Powered by www.kitware.com

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

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

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


[CMake] ExternalProject vs add_subdirectory (was Re: SubProject configuration in same build as host)

2010-04-15 Thread kent williams
There's a 'chicken-and-egg' problem with using ExternalProject in this
context: When you configure a project that uses ExternalProject_add,
that project won't be available to be found by FindPackage until AFTER
the project is built.  But CMake will want to find it at Configuration
Time, and it will not yet exist.

The only way I know out of this 'chicken and egg' problem is to make
ParaView itself an ExternalProject that depends on HDF5.

ExternalProject is great and all, but this is rather an annoying
problem, because the most natural thing to do would be to add
ExternalProjects into the CMakeLists.txt for the projects upon which
they depend. To do this, ExternalProject would probably have to be
more than a Module.

You can probably finesse this by defining the variables defined by
e.g. UseHDF5.cmake based on where the ExternalProject will drop its
files when it's done building and installs.

Or maybe this would be a good thing to add to the ExternalProject
macro itself -- have it define the variables a project would need to
use the ExternalProject once it's built.  Then at configure time, the
build system should be generated so that anything depending on an
ExternalProject should be built after it.


On Thu, Apr 15, 2010 at 5:57 AM, Dave Partyka dave.part...@kitware.com wrote:
 Just thinking out loud but we could make an external_project call instead.
 This would sync, configure, build and install it easily without needing to
 override anything. And then ParaView would just FindPackage(HDF5) with the
 internal build directory as a hint.

___
Powered by www.kitware.com

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

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

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


Re: [CMake] ExternalProject vs add_subdirectory (was Re: SubProject configuration in same build as host)

2010-04-15 Thread Dave Partyka
Humm you are right. HDF5 would need to be built before ParaView even
attempts to configure.

On Thu, Apr 15, 2010 at 10:08 AM, kent williams
nkwmailingli...@gmail.comwrote:

 There's a 'chicken-and-egg' problem with using ExternalProject in this
 context: When you configure a project that uses ExternalProject_add,
 that project won't be available to be found by FindPackage until AFTER
 the project is built.  But CMake will want to find it at Configuration
 Time, and it will not yet exist.

 The only way I know out of this 'chicken and egg' problem is to make
 ParaView itself an ExternalProject that depends on HDF5.

 ExternalProject is great and all, but this is rather an annoying
 problem, because the most natural thing to do would be to add
 ExternalProjects into the CMakeLists.txt for the projects upon which
 they depend. To do this, ExternalProject would probably have to be
 more than a Module.

 You can probably finesse this by defining the variables defined by
 e.g. UseHDF5.cmake based on where the ExternalProject will drop its
 files when it's done building and installs.

 Or maybe this would be a good thing to add to the ExternalProject
 macro itself -- have it define the variables a project would need to
 use the ExternalProject once it's built.  Then at configure time, the
 build system should be generated so that anything depending on an
 ExternalProject should be built after it.


 On Thu, Apr 15, 2010 at 5:57 AM, Dave Partyka dave.part...@kitware.com
 wrote:
  Just thinking out loud but we could make an external_project call
 instead.
  This would sync, configure, build and install it easily without needing
 to
  override anything. And then ParaView would just FindPackage(HDF5) with
 the
  internal build directory as a hint.
 

___
Powered by www.kitware.com

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

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

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

Re: [CMake] Assembler flag support

2010-04-15 Thread Alexander Neundorf
On Thursday 15 April 2010, Matthias Goesswein wrote:
 Hello!

 Is there a variable like CMAKE_C_FLAGS_INIT for the assembler available?

 (e.g. CMAKE_ASM${ASM_DIALECT}_FLAGS_INIT)

Did you try this one ?
I didn't add any explicit support for that, but I think this should work 
autoamtically for any language support by cmake (if it doesn't, I'll fix it 
for ASM).

Alex
___
Powered by www.kitware.com

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

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

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


[CMake] Making a Visual Studio project for Windows Mobile

2010-04-15 Thread knight666
Hi,

so far, my night has been extremely frustrating, trying to learn CMake.
However, I'm slowly getting there. There are a couple of things bugging me
though:

*1) Additional Library Directories*

I can either have this:

CMake: link_directories (../../YoghurtGum/bin)
Output:
AdditionalLibraryDirectories=..\..\YoghurtGum\bin\$(OutDir),..\..\YoghurtGum\bin

Or this:

CMake: link_directories (${PROJECT_SOURCE_DIR}../../YoghurtGum/bin)
Output:
AdditionalLibraryDirectories=F:\Projects\YG3\Tests\Galaxians..\..\YoghurtGum\bin\$(OutDir),F:\Projects\YG3\Tests\Galaxians..\..\YoghurtGum\bin

Or this:

CMake: link_directories (${PROJECT_SOURCE_DIR}/../../YoghurtGum/bin)
Output:
AdditionalLibraryDirectories=..\..\YoghurtGum\bin\$(OutDir),..\..\YoghurtGum\bin

While what I really want is this:

Output: AdditionalLibraryDirectories=..\..\YoghurtGum\bin

*2) Setting the platform name*

I haven't been able to set it, but I want it to be Windows Mobile 5.0
Pocket PC SDK (ARMV4I) instead of Win32.

*3) Setting the intermediate directory*

I want to have this:

IntermediateDirectory=intermediate

instead of this:

IntermediateDirectory=Galaxians.dir\Release

but nothing seems to work.

*4) Output file*

It should be:

OutputFile=$(OutDir)\$(ProjectName)_debug.exe

instead of:

OutputFile=F:\Projects\YG3\Tests\Galaxians\bin\Debug\Galaxians.exe

Any help on any of these issues would be much appreciated.

Thanks in advance.
___
Powered by www.kitware.com

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

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

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

[CMake] CMake 2.8.1 + Qt/Cocoa + OS X Problem -- qt_menu.nib not getting copied

2010-04-15 Thread kent williams
I'll include my CMakeLists.txt at the end of this message, but the
long and the short of it is this: My ApplicationBundle crashes when I
try and open it with this classic error message:

Qt internal error: qt_menu.nib could not be loaded. The .nib file
should be placed in QtGui.framework/Versions/Current/Resources/  or in
the resources directory of your application bundle.

This is supposed to be fixed, as documented in this bug:

http://public.kitware.com/Bug/view.php?id=1

I checked out the latest GIT CMake and verified that the file in
question is the same in 2.8.1 and current GIT trunk.

So is there some magical extra step I need to get my bundle properly fixed up?

project( BRAINSTracerQT )
cmake_minimum_required(VERSION 2.8)
cmake_policy(VERSION 2.8)

find_package( VTK REQUIRED )
include(${VTK_USE_FILE})

find_package( ITK REQUIRED )
include(${ITK_USE_FILE})

find_package( Qt4 REQUIRED )
if(QT_USE_FILE)
  include(${QT_USE_FILE})
  set(QT_USE_QTXML 1)
else(QT_USE_FILE)
  set( QT_LIBRARIES   ${QT_QT_LIBRARY})
endif(QT_USE_FILE)

find_package(ModuledescriptionParser REQUIRED)
include(${ModuleDescriptionParser_USE_FILE})

find_package(TCL REQUIRED)

find_package( VTK REQUIRED )
include(${VTK_USE_FILE})

find_package( ITK REQUIRED )
include(${ITK_USE_FILE})
include_directories(
  ${BRAINSTracerQT_SOURCE_DIR}
  ${BRAINSTracerQT_BINARY_DIR}
)

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ExecutablePath.h.in
${CMAKE_BINARY_DIR}/ExecutablePath.h IMMEDIATE @ONLY)

add_subdirectory(vtkRenderingAddOn)
include_directories(${BRAINSTracerQT_SOURCE_DIR}/vtkRenderingAddOn)

set(BRAINSTracerQT_SRCS
main.cxx
BTMainWindow.cxx
vtkKWImage.cxx
vtkKWImage2D.cxx
QVtkImageViewer.cxx
vtkMultiWidgetBase.cxx
vtkMultiContourWidget.cxx
vtkBTPointSetWidget.cxx
vtkBTPointWidget.cxx
PolyDataUtils.cxx
BTContour.cxx
BTPolygon.cxx
DiscreteParticleFilter.cxx
PolygonFill.cxx
LoadMaskImage.cxx
qtcolorpicker.cxx
QVtkPropertyDialog.cxx
QModuleParameterWidget.cxx
QImageParameterWidget.cxx
QFileBrowserParameterWidget.cxx
)

set(BRAINSTracerQT_HDRS
BTMainWindow.h
QVtkImageViewer.h
qtcolorpicker.h
QVtkPropertyDialog.h
QModuleParameterWidget.h
QImageParameterWidget.h
QFileBrowserParameterWidget.h
)

set(BRAINSTracerQT_RCCS
BRAINSTracerQT.qrc)

set(BRAINSTracerQT_UIS
qvtkpropertydialog.ui)

QT4_WRAP_CPP( MOCSrcs ${BRAINSTracerQT_HDRS} )

QT4_ADD_RESOURCES(RCC_SRCS ${BRAINSTracerQT_RCCS})

QT4_WRAP_UI(UIHeaders ${BRAINSTracerQT_UIS} )

set_source_files_properties(${BRAINSTracerQT_SRCS}
PROPERTIES OBJECT_DEPENDS ${UIHeaders})

add_definitions(-DQT_GUI_LIBS -DQT_CORE_LIB -DQT3_SUPPORT)

#set_source_files_properties(${BRAINSTracerQT_SRCS} PROPERTIES
#  OBJECT_DEPENDS ${UIHeaders})

add_executable( BRAINSTracerQT
   MACOSX_BUNDLE
   WIN32
   ${BRAINSTracerQT_SRCS}
   ${MOCSrcs}
   ${RCC_SRCS}
)
target_link_libraries( BRAINSTracerQT
  QVTK
  ${QT_LIBRARIES}
  ${ITK_LIBRARIES}
  vtkRenderingAddOn
  vtkRendering
  vtkFiltering
  vtkVolumeRendering
  ${TCL_LIBRARY}
  ModuleDescriptionParser
)

GET_TARget_property(TARGET_EXEC_DIR BRAINSTracerQT RUNTIME_OUTPUT_DIRECTORY)
set(TARGET_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin)

set(DEFAULT_MODULE_SEARCH_PATH
${TARGET_EXEC_DIR}/Modules)

#
# Now the installation stuff below
#
SET(plugin_dest_dir bin)
SET(qtconf_dest_dir bin)
SET(APPS \${CMAKE_INSTALL_PREFIX}/bin/BRAINSTracerQT)
IF(APPLE)
  SET(plugin_dest_dir BRAINSTracerQT.app/Contents/MacOS)
  SET(qtconf_dest_dir BRAINSTracerQT.app/Contents/Resources)
  SET(APPS \${CMAKE_INSTALL_PREFIX}/BRAINSTracerQT.app)
ENDIF(APPLE)
IF(WIN32)
  SET(APPS \${CMAKE_INSTALL_PREFIX}/bin/BRAINSTracerQT.exe)
ENDIF(WIN32)

#
# Install the BRAINSTracerQT application, on Apple, the bundle is at
the root of the
# install tree, and on other platforms it'll go into the bin directory.
INSTALL(TARGETS BRAINSTracerQT
BUNDLE DESTINATION . COMPONENT Runtime
RUNTIME DESTINATION bin COMPONENT Runtime
)

#
# Install needed Qt plugins by copying directories from the qt installation
# One can cull what gets copied by using 'REGEX ... EXCLUDE'
INSTALL(DIRECTORY ${QT_PLUGINS_DIR}/imageformats DESTINATION
${plugin_dest_dir}/plugins COMPONENT Runtime)

#
# install a qt.conf file
# this inserts some cmake code into the install script to write the file
INSTALL(CODE 
file(WRITE \\${CMAKE_INSTALL_PREFIX}/${qtconf_dest_dir}/qt.conf\ \\)
 COMPONENT Runtime)


#
# Use BundleUtilities to get all other dependencies for the application to work.

[CMake] CMake Matlab

2010-04-15 Thread James C. Sutherland
I have been trying to get CMake to build Matlab MEX files without any success.

I have hit several problems.

1. It seems that FindMatlab.cmake is not very functional.  I am on a Mac with 
Matlab 2010a and this script cannot find my installation.  It seems to be tuned 
only for windows, and old versions of Matlab.  Is it not supported?


2. The instructions on http://www.cmake.org/Wiki/CMake:MatlabMex don't seem to 
work either.
I tried following the approach of setting MEX as the CC and CXX compiler, but 
even on the trivial hello world example posted on the wiki page, CMake fails 
during the configure phase:
The C compiler /Applications/MATLAB_R2010a.app/bin/mex is not able to 
compile a simple test program.


Is anyone using Matlab in their CMake files?  I am trying to build a rather 
large project with mixture of C, C++, fortran, Matlab, and python code.  I have 
the C, C++ and python stuff working, but the Matlab part is really causing 
problems!

Thanks for any tips!

James
___
Powered by www.kitware.com

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

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

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


Re: [CMake] CMake amp; Matlab

2010-04-15 Thread Matt McCormick
James C. Sutherland james.sutherl...@... writes:

 
 I have been trying to get CMake to build Matlab MEX files without any success.
 

 1. It seems that FindMatlab.cmake is not very functional.  I am on a Mac with 

If I recall correctly, it is rather out of date.

 
 2. The instructions on http://www.cmake.org/Wiki/CMake:MatlabMex don't seem 
 to 
work either.
 I tried following the approach of setting MEX as the CC and CXX compiler, but 
even on the trivial hello
 world example posted on the wiki page, CMake fails during the configure 
 phase:
   The C compiler /Applications/MATLAB_R2010a.app/bin/mex is not able to 
compile a simple test program.
 

Did you apply to the patch linked on the wiki page and build your out custom 
CMake?


___
Powered by www.kitware.com

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

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

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


Re: [CMake] CMake amp; Matlab

2010-04-15 Thread James C. Sutherland
 
 2. The instructions on http://www.cmake.org/Wiki/CMake:MatlabMex don't seem 
 to work either.
 I tried following the approach of setting MEX as the CC and CXX compiler, 
 but even on the trivial hello
 world example posted on the wiki page, CMake fails during the configure 
 phase:
  The C compiler /Applications/MATLAB_R2010a.app/bin/mex is not able to 
 compile a simple test program.
 
 
 Did you apply to the patch linked on the wiki page and build your out custom 
 CMake?
 
I didn't apply the patch because I assumed that it had been fixed in 2.8.0 
(which is what I am using).  Is that not the case?
___
Powered by www.kitware.com

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

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

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


Re: [CMake] CMake 2.8.1 + Qt/Cocoa + OS X Problem -- qt_menu.nib not getting copied

2010-04-15 Thread Mike Jackson
I do not see any where in your code commands to actually copy the nib
file from the qtgui framework into your app bundle. I know thatbthe
way I set up my installation code I explicitly put a command to copy
the nib file. I believe there is a qt example on the cmake wiki that
shows how to do that.

-
Mike Jackson  www.bluequartz.net
Principal Software Engineer   mike.jack...@bluequartz.net
BlueQuartz Software   Dayton, Ohio


On Apr 15, 2010, at 17:06, kent williams nkwmailingli...@gmail.com
wrote:

 I'll include my CMakeLists.txt at the end of this message, but the
 long and the short of it is this: My ApplicationBundle crashes when I
 try and open it with this classic error message:

 Qt internal error: qt_menu.nib could not be loaded. The .nib file
 should be placed in QtGui.framework/Versions/Current/Resources/  or in
 the resources directory of your application bundle.

 This is supposed to be fixed, as documented in this bug:

 http://public.kitware.com/Bug/view.php?id=1

 I checked out the latest GIT CMake and verified that the file in
 question is the same in 2.8.1 and current GIT trunk.

 So is there some magical extra step I need to get my bundle properly
 fixed up?

 project( BRAINSTracerQT )
 cmake_minimum_required(VERSION 2.8)
 cmake_policy(VERSION 2.8)

 find_package( VTK REQUIRED )
 include(${VTK_USE_FILE})

 find_package( ITK REQUIRED )
 include(${ITK_USE_FILE})

 find_package( Qt4 REQUIRED )
 if(QT_USE_FILE)
  include(${QT_USE_FILE})
  set(QT_USE_QTXML 1)
 else(QT_USE_FILE)
  set( QT_LIBRARIES   ${QT_QT_LIBRARY})
 endif(QT_USE_FILE)

 find_package(ModuledescriptionParser REQUIRED)
 include(${ModuleDescriptionParser_USE_FILE})

 find_package(TCL REQUIRED)

 find_package( VTK REQUIRED )
 include(${VTK_USE_FILE})

 find_package( ITK REQUIRED )
 include(${ITK_USE_FILE})
 include_directories(
  ${BRAINSTracerQT_SOURCE_DIR}
  ${BRAINSTracerQT_BINARY_DIR}
 )

 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ExecutablePath.h.in
${CMAKE_BINARY_DIR}/ExecutablePath.h IMMEDIATE @ONLY)

 add_subdirectory(vtkRenderingAddOn)
 include_directories(${BRAINSTracerQT_SOURCE_DIR}/vtkRenderingAddOn)

 set(BRAINSTracerQT_SRCS
 main.cxx
 BTMainWindow.cxx
 vtkKWImage.cxx
 vtkKWImage2D.cxx
 QVtkImageViewer.cxx
 vtkMultiWidgetBase.cxx
 vtkMultiContourWidget.cxx
 vtkBTPointSetWidget.cxx
 vtkBTPointWidget.cxx
 PolyDataUtils.cxx
 BTContour.cxx
 BTPolygon.cxx
 DiscreteParticleFilter.cxx
 PolygonFill.cxx
 LoadMaskImage.cxx
 qtcolorpicker.cxx
 QVtkPropertyDialog.cxx
 QModuleParameterWidget.cxx
 QImageParameterWidget.cxx
 QFileBrowserParameterWidget.cxx
 )

 set(BRAINSTracerQT_HDRS
 BTMainWindow.h
 QVtkImageViewer.h
 qtcolorpicker.h
 QVtkPropertyDialog.h
 QModuleParameterWidget.h
 QImageParameterWidget.h
 QFileBrowserParameterWidget.h
 )

 set(BRAINSTracerQT_RCCS
 BRAINSTracerQT.qrc)

 set(BRAINSTracerQT_UIS
 qvtkpropertydialog.ui)

 QT4_WRAP_CPP( MOCSrcs ${BRAINSTracerQT_HDRS} )

 QT4_ADD_RESOURCES(RCC_SRCS ${BRAINSTracerQT_RCCS})

 QT4_WRAP_UI(UIHeaders ${BRAINSTracerQT_UIS} )

 set_source_files_properties(${BRAINSTracerQT_SRCS}
 PROPERTIES OBJECT_DEPENDS ${UIHeaders})

 add_definitions(-DQT_GUI_LIBS -DQT_CORE_LIB -DQT3_SUPPORT)

 #set_source_files_properties(${BRAINSTracerQT_SRCS} PROPERTIES
 #  OBJECT_DEPENDS ${UIHeaders})

 add_executable( BRAINSTracerQT
   MACOSX_BUNDLE
   WIN32
   ${BRAINSTracerQT_SRCS}
   ${MOCSrcs}
   ${RCC_SRCS}
 )
 target_link_libraries( BRAINSTracerQT
  QVTK
  ${QT_LIBRARIES}
  ${ITK_LIBRARIES}
  vtkRenderingAddOn
  vtkRendering
  vtkFiltering
  vtkVolumeRendering
  ${TCL_LIBRARY}
  ModuleDescriptionParser
 )

 GET_TARget_property(TARGET_EXEC_DIR BRAINSTracerQT
 RUNTIME_OUTPUT_DIRECTORY)
 set(TARGET_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin)

 set(DEFAULT_MODULE_SEARCH_PATH
${TARGET_EXEC_DIR}/Modules)

 #--
 ---
 ---
 ---
 -
 # Now the installation stuff below
 #--
 ---
 ---
 ---
 -
 SET(plugin_dest_dir bin)
 SET(qtconf_dest_dir bin)
 SET(APPS \${CMAKE_INSTALL_PREFIX}/bin/BRAINSTracerQT)
 IF(APPLE)
  SET(plugin_dest_dir BRAINSTracerQT.app/Contents/MacOS)
  SET(qtconf_dest_dir BRAINSTracerQT.app/Contents/Resources)
  SET(APPS \${CMAKE_INSTALL_PREFIX}/BRAINSTracerQT.app)
 ENDIF(APPLE)
 IF(WIN32)
  SET(APPS \${CMAKE_INSTALL_PREFIX}/bin/BRAINSTracerQT.exe)
 ENDIF(WIN32)

 #--
 ---
 ---
 ---
 -
 # Install the BRAINSTracerQT application, on Apple, the bundle is at
 the root of the
 # install tree, and on other platforms it'll go into the bin
 directory.
 INSTALL(TARGETS BRAINSTracerQT
BUNDLE DESTINATION . COMPONENT Runtime
RUNTIME DESTINATION bin COMPONENT Runtime
)

 #--
 ---
 ---
 ---
 -
 # Install needed Qt 

Re: [CMake] CMake amp;amp; Matlab

2010-04-15 Thread Matt McCormick
James C. Sutherland james.sutherl...@... writes:


  
 I didn't apply the patch because I assumed that it had been fixed in 2.8.0 
(which is what I am using).  Is that
 not the case?
 ___

No, it has not been applied yet.  I haven't tried the patch with 2.8, but it 
may 
work.  If not, you can still grab the 2.6 source.  

Either way, it is necessary to 
build cmake from patched source.




___
Powered by www.kitware.com

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

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

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


Re: [CMake] Adding Mac OS X Style Frameworks On Linux

2010-04-15 Thread Karol Krizka
Hi,

On Thu, Apr 8, 2010 at 1:45 PM, Alexander Neundorf
a.neundorf-w...@gmx.net wrote:
 On Wednesday 31 March 2010, Karol Krizka wrote:
 Hi there,

 I am trying to use CMake to develop Apps for a jailbroken iPhone using
 the iphonedevonlinux toolchain[1]. I got the toolchain to work and
 build the included test app, HelloToolchain. What I am trying to do
 next is write a CMakeLists.txt for this test App. I renamed it as
 KKToolchain for CMake enabled testing. Anyways, if you want to see
 what the Makefile should look like, see here[2].

 The way I am trying to accomplish is to use CMake's Cross Compiling
 support[3]. As per the WiKi entry, I've created a toolchain file
snip
 As you can see, it correctly finds the Foundation framework in my
 toolchain. But it complains when I try to link to it. I am assuming
 that this is because linking to frameworks in only supported on Mac OS
 X. Is this true? If so, is there some other way around it?

 Please put this in the cmake bug tracker at http://public.kitware.com/Bug/

 About the linking-to-frameworks... I remember there is something hardcoded
 somewhere which detects whether something is a framework and then does
 something... will have to look.
 Maybe somewhere a change from an #ifdef to something like a if (systemname
 == Darwin) might help...

You are right. On line 1329 of Source/cmComputeLinkInformation.cxx
(current git), I see:

  #ifdef __APPLE__
  if(cmSystemTools::IsPathToFramework(item.c_str()))
{
this-AddFrameworkItem(item);
}
  else
#endif

Commenting out the ifdef __APPLE__ makes everything work as I would like it to.

Also changing the block into the following helped:

  std::string systemName =
this-Makefile-GetSafeDefinition(CMAKE_SYSTEM_NAME);
  if(systemName == Darwin  cmSystemTools::IsPathToFramework(item.c_str()))
{
this-AddFrameworkItem(item);
}
  else
{
this-DropDirectoryItem(item);
}

--
Cheers,
Karol Krizka
http://www.krizka.net
___
Powered by www.kitware.com

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

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

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