[CMake] CPack and alternative install locations

2010-01-09 Thread Daniel Stonier
How does one cpack a deb into a toolchain's location?

With cmake_install_prefix I can get it to compile and install into the
correct place easily for both native builds (/usr/local) and cross-builds
(/usr/arm-unknown-linux-gnueabi/usr/local).

However, cpack ignores these settings and also seems to ignore any of the
cpack settings...putting everything into /usr.

The variables that dont seem to do anything:

CPACK_PACKAGE_INSTALL_DIRECTORY
CPACK_INSTALL_PREFIX
CPACK_SET_DESTDIR

Is there a 'correct' approach to enabling this?

Regards
Daniel Stonier

-- 
Phone : +82-10-5400-3296 (010-5400-3296)
HomePage: http://snorriheim.dnsdojo.com/
Yujin Robot: http://www.yujinrobot.com/
Projects: http://snorriheim.dnsdojo.com/redmine/projects
Embedded Control Libraries: http://snorriheim.dnsdojo.com/redmine/wiki/ecl
___
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] Qt qmake not found

2010-01-09 Thread Michael Jackson



On Jan 8, 2010, at 10:26 PM, David Doria wrote:

On Fri, Jan 8, 2010 at 10:10 PM, David Doria   
wrote:

On Fri, Jan 8, 2010 at 10:07 PM, Mike Jackson
 wrote:
You installed qt version 3 instead of qt version 4. Sudo apt-get  
install

qt4-dev.  Or something like that.

Mike

Sent from my iPod

On Jan 8, 2010, at 21:59, David Doria  wrote:

On Fri, Jan 8, 2010 at 9:50 PM, Tyler Roscoe   
wrote:


On Fri, Jan 08, 2010 at 09:30:14PM -0500, David Doria wrote:


I am trying to use:
FIND_PACKAGE(Qt4 REQUIRED)

However, I get:
 CMake Error at /usr/share/cmake/Modules/FindQt4.cmake:1625  
(MESSAGE):

  Qt qmake not found!

I am using Fedora 11. I did
yum install qt* qmake*

but nothing changed. Any suggestions?


You probably need to insure that qmake is in your PATH. If you  
just
installed it maybe you need to login again so you resource your  
shell

init files?

tyler



Hmm.. I restarted my shell and the error has changed to:
Qt libraries, includes, moc, uic or/and rcc NOT found!

qmake is now on my path:
[dor...@davedesktop BarChart]$ which qmake
/usr/lib/qt-3.3/bin/qmake

Any new thoughts?

Thanks,

David
___
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




Ah, yep, qt3 was on my path before qt4.

Thanks all,

David



One last thing (hopefully). What's the trick to making it find:
QT_PHONON_INCLUDE_DIR

automatically?

I set it to
/usr/include/phonon

and it works - but why wouldn't cmake find this?

Thanks,

David


Maybe a bug in FindQt4.cmake?

_
Mike Jackson  mike.jack...@bluequartz.net
BlueQuartz Softwarewww.bluequartz.net
Principal Software Engineer  Dayton, Ohio
___
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] Qt qmake not found

2010-01-09 Thread Clinton Stimpson



One last thing (hopefully). What's the trick to making it find:
QT_PHONON_INCLUDE_DIR

automatically?

I set it to
/usr/include/phonon

and it works - but why wouldn't cmake find this?

Thanks,

David


Maybe a bug in FindQt4.cmake?



It probably is a bug.  Can you open a bug report?
Its found on mine because installing the phonon package makes a softlink
/usr/include/qt4/phonon to /usr/include/phonon.

Clint

___
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] Qt qmake not found

2010-01-09 Thread David Doria
On Sat, Jan 9, 2010 at 12:20 PM, Clinton Stimpson  wrote:
>
>>> One last thing (hopefully). What's the trick to making it find:
>>> QT_PHONON_INCLUDE_DIR
>>>
>>> automatically?
>>>
>>> I set it to
>>> /usr/include/phonon
>>>
>>> and it works - but why wouldn't cmake find this?
>>>
>>> Thanks,
>>>
>>> David
>>
>> Maybe a bug in FindQt4.cmake?
>>
>
> It probably is a bug.  Can you open a bug report?
> Its found on mine because installing the phonon package makes a softlink
> /usr/include/qt4/phonon to /usr/include/phonon.
>
> Clint
>

Ok, I filed a report here:
http://public.kitware.com/Bug/view.php?id=10114

Thanks,

David
___
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] ANN: UseOcaml.cmake

2010-01-09 Thread Keyan
Hi,

adapted from UseLATEX.cmake, i wrote a UseOcaml.cmake script, which can be 
found here:

http://yars.svn.sourceforge.net/viewvc/yars/branches/yars-refactoring/modules/UseOcaml.cmake?revision=509&view=markup

it is not complete yet, but it allows to easily compile ocaml-binaries in the 
following way:

  ADD_OCAML_TARGET(
  OUTPUTloc
  MAIN  loc.ml
  SOURCES   file_node.ml  files.ml  io.ml  file_statistics.ml  
message_node.ml
  HEADERS   file_node.mli files.mli io.mli file_statistics.mli 
message_node.mli
  LIBRARIES unix.cmxa str.cmxa extLib.cmxa
  INCLUDES  /opt/local/lib/ocaml/site-lib/extlib
  )

one current problem is that i cannot add multiple entries to the INCLUDES.

i am happy to receive comments.

cheers,
keyan
___
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] Coloured output for cmake on windows

2010-01-09 Thread Chauhan, Vikas
Hi,

I guess there is no end to wishes & this is another example of it.

Is it possible to get a coloured output on windows using a build command
like: cmake --build . ?

Currently is it because dos cmd window doesn't support it or there is
some other reason?

Thanks,
Vikas
___
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] "rule" to generate assembler listings for each c file

2010-01-09 Thread Arne Pagel

Hello,

I try to use cmake for crosscompiling an embedded project with arm-elf-gcc.
For a simple project, a CMakeLists.txt like this works fine for me:

cmake_minimum_required(VERSION 2.6)

SET(CMAKE_SYSTEM_NAME Generic)
SET(CMAKE_C_COMPILER arm-elf-gcc)

SET (CMAKE_SHARED_LINKER_FLAGS_INIT "")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")

SET (CMAKE_C_FLAGS "-O3 -g3 -Wall -L lib -mcpu=cortex-m3 -mthumb")
SET (CMAKE_EXE_LINKER_FLAGS "-mcpu=cortex-m3 -mthumb -nostartfiles -T link.ld")

add_executable (../test.elf startup.c main.c foo.c)
TARGET_LINK_LIBRARIES (../test.elf ${CMAKE_CURRENT_SOURCE_DIR}/lib/bar.a)


For debugging, I want gcc to export assembler listings for each c-file it 
compiles.

This can be done with adding -Wa,-ahl=file.lst to the C-Flags
SET (CMAKE_C_FLAGS "-O9 -g3 -Wall -L lib -mcpu=cortex-m3 -mthumb" 
-Wa,-ahl=file.lst)

But this is not exactly what I want,
instead of file.lst I want that "file" is replaced with the filename which make is currently 
processing.

The result should be foo.lst while processing foo.c and main.lst for main.c.

I know how I can solve it with make, but I have no idea how I could tell this 
to cmake.

I found CMAKE_CURRENT_LIST_FILE, but I don't know if it helps me.

Has anyone an Idea?

Best Regards
  Arne
___
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] error while stage install of crosscompiled binaries

2010-01-09 Thread Claus Klein

Hi all,

now I got it:

There are 3 different problems:
1.) never use an absolute DESTINATION path with INSTALL commands!
 	###XXX### INSTALL( FILES cmake/FindLibSmi.cmake DESTINATION $ 
{CMAKE_ROOT}/Modules )


2.) never use an absolute source Path!
	###XXX### INSTALL( FILES ${CMAKE_BINARY_DIR}/libsmi.pc DESTINATION  
lib/pkgconfig )


3) never use a Windows drive letter in one of this paths as "C:/usr"
with CMAKE_INSTALL_PREFIX=C:/usr
	###XXX### INSTALL( FILES smi.conf-example DESTINATION $ 
{CMAKE_INSTALL_PREFIX}/${CMAKE_SYSTEMCONFIG} )


If not, you will get problems in some cases like crosscompile:

test -d build/CMakeFiles && rm -rf build/*
cd build && cmake -DCMAKE_C_COMPILER=i386-mingw32-gcc - 
DCMAKE_CXX_COMPILER=i386-mingw32-g++ -DCMAKE_SYSTEM_NAME=Windows .. \

&& make 2>&1 | tee ../crosscompile.log

. . . .

+ make DESTDIR=/tmp/libsmi install/local
+ tee ../temp-install.log
[  1%] Built target generate_dump_svg_script_h
[  3%] Built target backend_smi_bison
[  5%] Built target backend_sming_bison
[  6%] Built target backend_smi_flex
[  8%] Built target backend_sming_flex
[  8%] Built target generated
[ 34%] Built target smi
[ 37%] Built target smidiff
[ 87%] Built target smidump
[ 91%] Built target smilint
[ 94%] Built target smiquery
[100%] Built target smixlate
Installing only the local directory...
-- Install configuration: "Release"
CMake Error at cmake_install.cmake:31 (FILE):
  file cannot create directory:
  /tmp/libsmi/Users/clausklein/Workspace/c/libsmi/libsmi-latejuly09- 
cmake/build/C:/usr/lib/pkgconfig.

  Maybe need administrative privileges.


make: *** [install/local] Error 1
+ cmake -DCMAKE_INSTALL_PREFIX=C:/usr -DCMAKE_INSTALL_LOCAL_ONLY=1 -P  
cmake_install.cmake

+ tee ../temp-install.log
-- Install configuration: "Release"
-- Installing: /Users/clausklein/Workspace/c/libsmi/libsmi-latejuly09- 
cmake/build/C:/usr/lib/pkgconfig/libsmi.pc
-- Installing: /Users/clausklein/Workspace/c/libsmi/libsmi-latejuly09- 
cmake/build/C:/usr/lib/pkgconfig/libsmi.pc
-- Installing: /Users/clausklein/Workspace/c/libsmi/libsmi-latejuly09- 
cmake/build/C:/usr/etc/smi/smi.conf/smi.conf-example
-- Installing: /Users/clausklein/Workspace/c/libsmi/libsmi-latejuly09- 
cmake/build/C:/usr/C:/usr/etc/smi/smi.conf/smi.conf-example   
really bad!
-- Installing: /Users/clausklein/Workspace/c/libsmi/libsmi-latejuly09- 
cmake/build/C:/usr/share/cmake/Modules/FindLibSmi.cmake

-- Installing: /opt/local/share/cmake-2.8/Modules/FindLibSmi.cmake
CMake Error at cmake_install.cmake:51 (FILE):
  file INSTALL cannot copy file
  "/Users/clausklein/Workspace/c/libsmi/libsmi-latejuly09-cmake/cmake/ 
FindLibSmi.cmake"

  to "/opt/local/share/cmake-2.8/Modules/FindLibSmi.cmake".


+ cmake -DCMAKE_INSTALL_PREFIX=/tmp/libsmi/usr - 
DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake

+ tee ../temp-install.log
-- Install configuration: "Release"
-- Up-to-date: /tmp/libsmi/usr/lib/pkgconfig/libsmi.pc
-- Installing: /tmp/libsmi/usr/lib/pkgconfig/libsmi.pc
-- Up-to-date: /tmp/libsmi/usr/etc/smi/smi.conf/smi.conf-example
-- Installing: /tmp/libsmi/usr/C:/usr/etc/smi/smi.conf/smi.conf-example
-- Up-to-date: /tmp/libsmi/usr/share/cmake/Modules/FindLibSmi.cmake
-- Installing: /opt/local/share/cmake-2.8/Modules/FindLibSmi.cmake
CMake Error at cmake_install.cmake:51 (FILE):
  file INSTALL cannot copy file
  "/Users/clausklein/Workspace/c/libsmi/libsmi-latejuly09-cmake/cmake/ 
FindLibSmi.cmake"

  to "/opt/local/share/cmake-2.8/Modules/FindLibSmi.cmake".


+ exit
claus-kleins-macbook-pro:libsmi-latejuly09-cmake clausklein$

I hope you see that something should changed with make install.

//regards

Claus


On 08.01.2010, at 22:26, Claus Klein wrote:


Hi David,

Yes, this works fine when I change the CMAKE_INSTALL_PREFIX at  
CMakeCache.txt, sure.


There is only one fault: the config files will be rebuild with the  
wrong path before install :-((



At least, I know 2 packages, NetSnmp and LibSmi, they has to be  
compiled with fix absolute paths,
including the device name on Windows, that is not my idea! It would  
be better to use a ConfigFile and
the program can be install at any place. But they is a history and  
they needs there MIB's.
(What is the current drive to find this config file when I start c:/ 
usr/bin/smilint from d:/workdir?)


When I add the string replace command to the cmake_install.cmake  
file, it works as a quick hack.
This should only remove the drive string in the middle, not the  
beginning of the PREFIX path:


STRING(REGEX REPLACE "/[A-Za-z]:/" "/" CMAKE_INSTALL_PREFIX "$ 
{CMAKE_INSTALL_PREFIX}")


But I know that this can't be the general solution.


I did not see any DESTDIR in this file, so I think it will be set as  
parameter or in environment?

Only if DESTDIR is given, this drive name has to be replace.

Where is the DESTDIR prepended to the PREFIX?
Is there a template for this generated cmake_install.cmake?

Claus

On 08.01.2010, at 17:49, David Cole wrote:

On Fri, Jan 8, 2010 at 

[CMake] Can you add sources to a target library after add_library()?

2010-01-09 Thread Marcel Loose
Hi all,

I've been searching the manuals, but couldn't find a way to add sources
to a target library *after* the add_library() command, e.g., using
set_target_properties()? Is this possible at all?

Best regards,
Marcel Loose.


___
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] Can you add sources to a target library after add_library()?

2010-01-09 Thread Philip Lowman
I highly doubt it.  Best practice is to just use conditionals to add
the necessary source files to a list variable prior to the
add_library() call.

On Sat, Jan 9, 2010 at 5:48 PM, Marcel Loose  wrote:
> Hi all,
>
> I've been searching the manuals, but couldn't find a way to add sources
> to a target library *after* the add_library() command, e.g., using
> set_target_properties()? Is this possible at all?
>
> Best regards,
> Marcel Loose.
>
>
> ___
> 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
>



-- 
Philip Lowman
___
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