Re: [CMake] qt standalone project : static link or dll copy (and how to do it?)

2008-09-26 Thread Ralf Habacker
Michael Jackson schrieb: The following is what I use. There may be better methods You may take a look at the kdewin installer build system source which is available at http://websvn.kde.org/trunk/kdesupport/kdewin-installer/CMakeLists.txt?revision=854656view=markup Search for the term

[CMake] Automated CPACK_STRIP_FILES

2008-09-26 Thread Mathieu Malaterre
'lo, did anyone wrote a small cmake script to harvest all found executables and pass that list to CPACK_STRIP_FILES ? Thanks -- Mathieu ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake

[CMake] Not planning to Build Executable

2008-09-26 Thread Jan Roehrich
Hello list, I have the following problem: I'm using cmake in a C++ project where I create some executables which sources rest in its own directories. These directories are included using ADD_SUBDIRECTORY. One subdirectory is called peer. When I execute cmake, I get - among other things - the

[CMake] Dependent Libraries added automatically?

2008-09-26 Thread Mike Jackson
I started noticing some warnings when I am linking my project executables that bascially says libraries are listed multiple times on the link line. Now this is just a warning so I _could_ ignore it but I am curios about how cmake is working at this point. Here is what I have: Library

Re: [CMake] Dependent Libraries added automatically?

2008-09-26 Thread Bill Hoffman
Mike Jackson wrote: I started noticing some warnings when I am linking my project executables that bascially says libraries are listed multiple times on the link line. Now this is just a warning so I _could_ ignore it but I am curios about how cmake is working at this point. Here is what I

Re: [CMake] Dependent Libraries added automatically?

2008-09-26 Thread Michael Jackson
On Sep 26, 2008, at 2:28 PM, Bill Hoffman wrote: Mike Jackson wrote: I started noticing some warnings when I am linking my project executables that bascially says libraries are listed multiple times on the link line. Now this is just a warning so I _could_ ignore it but I am curios about

[CMake] cmake link against Qt4's OpenGL

2008-09-26 Thread Linge Bai
Hi everybody, I have a project developed by Qt4's OpenGL, for example plenty of usage of QGLWidget class. I want to use cmake to compile this project, instead of using qmake, because I need to combine another project to it. I can only link against Qt4 and OpenGL seperately. But I cannot link

Re: [CMake] cmake link against Qt4's OpenGL

2008-09-26 Thread Michael Jackson
Can you send the source files? Mike On Sep 26, 2008, at 3:02 PM, Linge Bai wrote: Hi everybody, I have a project developed by Qt4's OpenGL, for example plenty of usage of QGLWidget class. I want to use cmake to compile this project, instead of using qmake, because I need to combine

Re: [CMake] cmake link against Qt4's OpenGL

2008-09-26 Thread clinton
It should simply be: PROJECT ( COMBINED ) FIND_PACKAGE (Qt4 REQUIRED) SET(QT_USE_QTOPENGL TRUE) INCLUDE( ${QT_USE_FILE} ) ADD_EXECUTABLE(exe main.cpp glwidget.cpp window.cpp) TARGET_LINK_LIBRARIES(exe ${QT_LIBRARIES}) Clint On Friday 26 September 2008 1:02:43 pm Linge Bai wrote: Hi everybody,

Re: [CMake] cmake link against Qt4's OpenGL

2008-09-26 Thread clinton
Then you must have a static build of Qt? If you use CMake 2.6.0 or greater, it should work with a static Qt. Clint On Friday 26 September 2008 1:22:54 pm Linge Bai wrote: I still have the same problems: [15:20:04] ~/Desktop/myQt/hellogl$ cmake . -- Found Qt-Version 4.4.2 -- Configuring

Re: [CMake] Dependent Libraries added automatically?

2008-09-26 Thread Bill Hoffman
Michael Jackson wrote: add_library(a ...) target_link_library(a b c) add_executable(foo ...) target_link_libraries(foo a) This will cause foo to link to a b c. With CMake 2.6.2 you can stop this from happening with a target property:

Re: [CMake] cmake link against Qt4's OpenGL

2008-09-26 Thread Linge Bai
After I used cmake 2.6.1, with CMakeList.txt: PROJECT ( COMBINED ) FIND_PACKAGE (Qt4 REQUIRED) SET(QT_USE_QTOPENGL TRUE) INCLUDE( ${QT_USE_FILE} ) ADD_EXECUTABLE(exe main.cpp glwidget.cpp window.cpp) TARGET_LINK_LIBRARIES(exe ${QT_LIBRARIES}) I am able to link to Qt4's OpenGL, but I have a link

Re: [CMake] cmake link against Qt4's OpenGL

2008-09-26 Thread Michael Jackson
You are building on 10.5 using the 10.4u sdk. Why. If you need to deploy on 10.4 then you will need to add the following CMAKE_C_FLAGS and CMAKE_CXX_FLAGS to your compile. -mmacosx-version-min=10.4. and change the CMAKE_OSX_SYSROOT to 10.5.sdk. This scenario will make sure your app can run

Re: [CMake] cmake link against Qt4's OpenGL

2008-09-26 Thread Michael Jackson
What is your OS X version, (PPC or Intel), Xcode toolset version, and what are you setting the CMAKE_OSX_SYSROOT value to? It should be / Developer/SDKs/MacOSX10.5.sdk Mike On Sep 26, 2008, at 4:26 PM, Linge Bai wrote: so if I use cmake 2.6.1, with the following CMakeList.txt file:

Re: [CMake] cmake link against Qt4's OpenGL

2008-09-26 Thread Michael Jackson
run ccmake instead of cmake on your project. Look down the left hand side of cmake variables. It should be listed. By default it should be 10.5.sdk so I am not sure what is really going wrong. also, do the following: make clean make VERBOSE=1 in your build directory and lets examine the

Re: [CMake] cmake link against Qt4's OpenGL

2008-09-26 Thread Michael Jackson
Set the CMAKE_OSX_SYSROOT to /Developer/SDKs/MacOSX10.5.sdk and try again. Also, you do actually have the MacOSX10.5.sdk available correct? The link line contains all the proper OpenGL (both apple and Qt) frameworks. You just need to get past the SDK setting first. Mike On Sep 26, 2008,

[CMake] Fwd: cmake link against Qt4's OpenGL

2008-09-26 Thread Linge Bai
-- Forwarded message -- From: Linge Bai [EMAIL PROTECTED] Date: Fri, Sep 26, 2008 at 4:52 PM Subject: Re: [CMake] cmake link against Qt4's OpenGL To: Michael Jackson [EMAIL PROTECTED] Attached is a screen shot of running ccmake. It's MacOSX10.4u.sdk. And it showed that QTOPENGL

[CMake] Fwd: cmake link against Qt4's OpenGL

2008-09-26 Thread Linge Bai
I set CMAKE_OSX_SYSROOT to /Developer/SDKs/MacOSX10.5.sdk and generated the makefile. The QTOPENGL and QGLWIDGET are still not found. But they do exist. I get these errors: make [ 33%] Building CXX object CMakeFiles/exe.dir/main.o [ 66%] Building CXX object CMakeFiles/exe.dir/glwidget.o [100%]

Re: [CMake] Fwd: cmake link against Qt4's OpenGL

2008-09-26 Thread Michael Jackson
Look in the GLWidget source file and see if there is actually a zRotationChanged(int) method available. Mike On Sep 26, 2008, at 5:15 PM, Linge Bai wrote: I set CMAKE_OSX_SYSROOT to /Developer/SDKs/MacOSX10.5.sdk and generated the makefile. The QTOPENGL and QGLWIDGET are still not

[CMake] Fwd: Fwd: cmake link against Qt4's OpenGL

2008-09-26 Thread Linge Bai
Yes, this program runs well when compile with qmake. Linge On Fri, Sep 26, 2008 at 5:18 PM, Michael Jackson [EMAIL PROTECTED] wrote: Look in the GLWidget source file and see if there is actually a zRotationChanged(int) method available. Mike On Sep 26, 2008, at 5:15 PM, Linge Bai

Re: [CMake] Fwd: Fwd: cmake link against Qt4's OpenGL

2008-09-26 Thread Michael Jackson
use make VERBOSE=1 and examine the link line. If you still have the qmake project around compare the link lines between the 2 projects. I have no idea. I have not used the QtOpenGL library before so this is all new to me. Mike On Sep 26, 2008, at 5:24 PM, Linge Bai wrote: Yes, this

[CMake] Fortran project fails for Release but works for Debug

2008-09-26 Thread Kelly (KT) Thompson
Hi, I have a simple Fortran CMake project that fails to build for Release build types but works for Debug. Can someone tell me what is wrong with the following? ! file main.f90 program main print *, Hello end program main # CMakeLists.txt cmake_minimum_required( VERSION 2.6 FATAL_ERROR )

Re: [CMake] Assembler and C++ for the same target

2008-09-26 Thread Matthew Woehlke
Stefan Weber wrote: set(${CMAKE_ASM_SOURCE_FILE_EXTENSIONS} s;S) but this does not help. To debug this, I do the following on the next line message(${CMAKE_ASM_SOURCE_FILE_EXTENSIONS}) Strangly, this does not print anything, just an empty line. Why is that? Well, you didn't set