[CMake] Checking SoVersion of Shared Library

2011-05-12 Thread tiantik
Hi CMake's members,

My project has two parts: shared library and executable. The soversion of
shared library is libxxx.so.1.2.3. Now, the cmakelist.txt of executable will
check this soversion of shared library as . How do I do this checking?

Thanks.
___
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] Checking SoVersion of Shared Library

2011-05-12 Thread Micha Renner
Am Donnerstag, den 12.05.2011, 11:15 +0300 schrieb tiantik:
> Hi CMake's members,
> 
> My project has two parts: shared library and executable. The soversion
> of shared library is libxxx.so.1.2.3. Now, the cmakelist.txt of
> executable will check this soversion of shared library as . How do I
> do this checking?
Maybe the solution is here:
http://www.cmake.org/Wiki/CMake/Tutorials/Packaging

Micha



___
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] How to invoke a separate build with CMAKE_CUSTOM_TARGET?

2011-05-12 Thread Heine, Christian (EXTERN: VWGEDS)
Hi,

I'm not sure that I'm on the right path, therfore I will explain what I will 
do. I'm migrating our Linux project to Windows plattforms. Our project is build 
on several modules, which have to create and installed as libraries with cmake, 
some modules have dependencies to other modules. So far so good. This works 
fine on linux and windows.

Now I've implemented several demos for one of those modules. On Linux there is 
no problem, if I've installed the dependencies correctly I could build my demo 
executables and run them directly. But on windows platfforms I'm struggling. To 
run the executables it's required to place the required libraries besides the 
executable or in system32 folder ...

If I install the module dependencies with a cutstom install target to system32 
folder I could ensure that those libraries could be linked by the executable at 
runtime. So I've got a behaviour like on Linux plattform for the module 
dependencies. But what is the best way to handling the library of the actual 
build? This file is placed to a lib subfolder which is differend from the demo 
executalbes (bin subfolder). 

First I've thought I could solve this problem if I copy the resulting dll to 
the demo executables folder with FILE COPY command. But this fails when I clean 
my build, while those dll doesn't exists after a clean. If i now run CMake 
again I got a file not found error ...

So I've thougt I could solve this problem with a CREATE_CUSTOM_TARGET command, 
i.e. make demo, which builds the demo sources separatelly and finally copy the 
dll from lib folder to executable folder. But how I could invoke a new make of 
my demo CMakeLists.txt with CREATE_CUSTOM_TARGET? 
I've tried several combinations but i fail.

What is the best way to solve this requirements? Or I'm completly on wrong path?

> Mit freundlichen Grüßen
> 
Christian Heine

T-Systems on site services GmbH
Procurement Systems

> E-Mail: extern.christian.he...@volkswagen.de
> 


Christian Heine
Consultant
Alessandro-Volta-Straße 11, 38440 Wolfsburg
+49-5361-464 78-x (Tel.)
+49-5361-464 78-10 (Fax)
E-Mail: christian.he...@t-systems.com
Internet: http://www.t-systems-onsite.de 

Geschäftsführung: Stefan Kappe, Georg Rätker
Handelsregister: Amtsgericht Berlin HRB 51336
Sitz der Gesellschaft: Berlin
Ust.-Id Nr. DE 181 120 485



Notice: This transmittal and/or attachments may be privileged or confidential. 
If you are not the intended recipient, you are hereby notified that you have 
received this transmittal in error; any review, dissemination, or copying is 
strictly prohibited. If you received this transmittal in error, please notify 
us immediately by reply and immediately delete this message and all its 
attachments. Thank you.

___
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] How to invoke a separate build with CMAKE_CUSTOM_TARGET?

2011-05-12 Thread Rolf Eike Beer
> Hi,
>
> I'm not sure that I'm on the right path, therfore I will explain what I
> will do. I'm migrating our Linux project to Windows plattforms. Our
> project is build on several modules, which have to create and installed as
> libraries with cmake, some modules have dependencies to other modules. So
> far so good. This works fine on linux and windows.
>
> Now I've implemented several demos for one of those modules. On Linux
> there is no problem, if I've installed the dependencies correctly I could
> build my demo executables and run them directly. But on windows platfforms
> I'm struggling. To run the executables it's required to place the required
> libraries besides the executable or in system32 folder ...
>
> If I install the module dependencies with a cutstom install target to
> system32 folder I could ensure that those libraries could be linked by the
> executable at runtime. So I've got a behaviour like on Linux plattform for
> the module dependencies. But what is the best way to handling the library
> of the actual build? This file is placed to a lib subfolder which is
> differend from the demo executalbes (bin subfolder).

You can install the different "parts" of a library to different folders
(see the documentation of which parts means what). So this may solve your
issue by installing the DLLs to the same place as the executables:

INSTALL(TARGETS mylib
 RUNTIME DESTINATION bin
 LIBRARY DESTINATION lib
 ARCHIVE DESTINATION lib)

Also installing into system32 on Windows usually causes great mess. If the
above doesn't work just try adding your lib directory to the system PATH
before starting your executable.

Eike
___
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] How to invoke a separate build with CMAKE_CUSTOM_TARGET?

2011-05-12 Thread Heine, Christian (EXTERN: VWGEDS)
Thanks Eike for this hint! This works, but I couldn't use it. 

One reason is, that any module is loosely coupled. It doesn't know where the 
other modules it's depends on are located. By this reason I need a place where 
any final library is archived and could be linked by the executable at runtime 
like the /usr/local/lib folder on Linux, so I think the system32 folder is the 
right place on windows platforms ...

The second reason is, that I've to perform an installation before I could start 
the demo files. But normally I would start them before I install the module, 
i.e. to test implementation details. By this reason the demo executable must be 
able to link the actual library after a simple build...

>Mit freundlichen Grüßen
>
Christian Heine

T-Systems on site services GmbH
Procurement Systems

>Telefon/phone: +49-5361-9-78564
>E-Mail: extern.christian.he...@volkswagen.de
>


Christian Heine
Consultant
Alessandro-Volta-Straße 11, 38440 Wolfsburg
+49-5361-464 78-x (Tel.)
+49-5361-464 78-10 (Fax)
E-Mail: christian.he...@t-systems.com
Internet: http://www.t-systems-onsite.de 

Geschäftsführung: Stefan Kappe, Georg Rätker
Handelsregister: Amtsgericht Berlin HRB 51336
Sitz der Gesellschaft: Berlin
Ust.-Id Nr. DE 181 120 485



Notice: This transmittal and/or attachments may be privileged or confidential. 
If you are not the intended recipient, you are hereby notified that you have 
received this transmittal in error; any review, dissemination, or copying is 
strictly prohibited. If you received this transmittal in error, please notify 
us immediately by reply and immediately delete this message and all its 
attachments. Thank you.

-Ursprüngliche Nachricht-
Von: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] Im Auftrag von 
Rolf Eike Beer
Gesendet: Donnerstag, 12. Mai 2011 11:33
An: cmake@cmake.org
Betreff: Re: [CMake] How to invoke a separate build with CMAKE_CUSTOM_TARGET?

> Hi,
>
> I'm not sure that I'm on the right path, therfore I will explain what I
> will do. I'm migrating our Linux project to Windows plattforms. Our
> project is build on several modules, which have to create and installed as
> libraries with cmake, some modules have dependencies to other modules. So
> far so good. This works fine on linux and windows.
>
> Now I've implemented several demos for one of those modules. On Linux
> there is no problem, if I've installed the dependencies correctly I could
> build my demo executables and run them directly. But on windows platfforms
> I'm struggling. To run the executables it's required to place the required
> libraries besides the executable or in system32 folder ...
>
> If I install the module dependencies with a cutstom install target to
> system32 folder I could ensure that those libraries could be linked by the
> executable at runtime. So I've got a behaviour like on Linux plattform for
> the module dependencies. But what is the best way to handling the library
> of the actual build? This file is placed to a lib subfolder which is
> differend from the demo executalbes (bin subfolder).

You can install the different "parts" of a library to different folders
(see the documentation of which parts means what). So this may solve your
issue by installing the DLLs to the same place as the executables:

INSTALL(TARGETS mylib
 RUNTIME DESTINATION bin
 LIBRARY DESTINATION lib
 ARCHIVE DESTINATION lib)

Also installing into system32 on Windows usually causes great mess. If the
above doesn't work just try adding your lib directory to the system PATH
before starting your executable.

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


Re: [CMake] Parameters of functions

2011-05-12 Thread Glenn Coombs
I think you probably wanted to write and call your function like this:

FUNCTION(build var)
   MESSAGE(STATUS "var: ${var}")
ENDFUNCTION(build)

SET(var red blue yellow green)
build("${var}")

That prints out as you would expect:

-- var: red;blue;yellow;green

--
Glenn


On 12 May 2011 07:27, Rolf Eike Beer  wrote:

> > This is funny:
> > FUNCTION(build var)
> >   MESSAGE(STATUS "var: " ${${var}})
> > ENDFUNCTION(build)
> >
> > SET(var red blue yellow green)
> > build(var)
> >
> > Output:
> > -- var: var
> >
> > SET(varX red blue yellow green)
> > build(varX)
> > Output:
> > -- var: redblueyellowgreen
>
> No, it must be that way. Inside build() var is defined as the variable
> that is defined in the interface. build() has no way to see the variable
> outside it because it can only find the inner name. It could reference
> it's value if you had passed the value or it could reference the variable
> by name if it would not be hidden by your interface variable.
>
> int a = 2;
>
> int build(int a)
> {
>  return a;
> }
>
> int b = build(42);
>
> b will be 42.
>
> Eike
> ___
> 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

Re: [CMake] How to invoke a separate build with CMAKE_CUSTOM_TARGET?

2011-05-12 Thread Rolf Eike Beer
Am Donnerstag, 12. Mai 2011, 12:40:54 schrieb Heine, Christian:
> Thanks Eike for this hint! This works, but I couldn't use it.
> 
> One reason is, that any module is loosely coupled. It doesn't know where the
> other modules it's depends on are located. By this reason I need a place
> where any final library is archived and could be linked by the executable
> at runtime like the /usr/local/lib folder on Linux, so I think the system32
> folder is the right place on windows platforms ...
> 
> The second reason is, that I've to perform an installation before I could
> start the demo files. But normally I would start them before I install the
> module, i.e. to test implementation details. By this reason the demo
> executable must be able to link the actual library after a simple build...

SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

This will create a lib and bin folder inside your build tree where all things 
will be located so it should be possible to run things just from the build 
tree. BTDT. MT.

Eike

signature.asc
Description: This is a digitally signed message part.
___
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] Parameters of functions

2011-05-12 Thread Michael Wild
Often one wants to pass in the *name* of a variable (i.e. the name of
list, like for list(APPEND name ...)), so Rolf's code does make sense.
Haven't had the time to try the test-case myself, though...

Michael

On 05/12/2011 12:50 PM, Glenn Coombs wrote:
> I think you probably wanted to write and call your function like this:
> 
> FUNCTION(build var)
>MESSAGE(STATUS "var: ${var}")
> ENDFUNCTION(build)
> 
> SET(var red blue yellow green)
> build("${var}")
> 
> That prints out as you would expect:
> 
> -- var: red;blue;yellow;green
> 
> --
> Glenn
> 
> 
> On 12 May 2011 07:27, Rolf Eike Beer  wrote:
> 
>>> This is funny:
>>> FUNCTION(build var)
>>>   MESSAGE(STATUS "var: " ${${var}})
>>> ENDFUNCTION(build)
>>>
>>> SET(var red blue yellow green)
>>> build(var)
>>>
>>> Output:
>>> -- var: var
>>>
>>> SET(varX red blue yellow green)
>>> build(varX)
>>> Output:
>>> -- var: redblueyellowgreen
>>
>> No, it must be that way. Inside build() var is defined as the variable
>> that is defined in the interface. build() has no way to see the variable
>> outside it because it can only find the inner name. It could reference
>> it's value if you had passed the value or it could reference the variable
>> by name if it would not be hidden by your interface variable.
>>
>> int a = 2;
>>
>> int build(int a)
>> {
>>  return a;
>> }
>>
>> int b = build(42);
>>
>> b will be 42.
>>
>> Eike


___
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] Parameters of functions

2011-05-12 Thread Micha Renner
Am Donnerstag, den 12.05.2011, 11:50 +0100 schrieb Glenn Coombs:
> I think you probably wanted to write and call your function like this:
> 
> FUNCTION(build var)
>MESSAGE(STATUS "var: ${var}")
> ENDFUNCTION(build)
> 
> SET(var red blue yellow green)
> build("${var}")
> 
> That prints out as you would expect:
> 
> -- var: red;blue;yellow;green
> 
Both versions are possible. 
My point was, that in the case I described, the name of the parameter of
the function may not be the same as the name of variable the function is
called.

With your version you don't have this problem.
Thanks.

Micha



___
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] How to invoke a separate build with CMAKE_CUSTOM_TARGET?

2011-05-12 Thread Heine, Christian (EXTERN: VWGEDS)
Hmm, this is strange. I've followed your instructions, but those take no effect.
When i try to run the executable I got the failure message box that my 
libbrOpenGL.dll 
of the acutal build result is missing. Here is what I do on demo build:

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} 
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/include
${COMPILER_ROOT}/include/binrev
)

# Find OpenGL library using default CMake find script
FIND_PACKAGE(OpenGL REQUIRED)

# create output directory
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)

# Make sure the linker can find our libraries once they are built.
LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib)  

# Find our cmake utils with different reusable macros
FIND_PACKAGE(OpenGL REQUIRED)

# create exectuable
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
ADD_EXECUTABLE(mydemo demo_win32Camera.cpp)

#link test libraries for unit tests
TARGET_LINK_LIBRARIES( mydemo
   brOpenGL  # this is the library of the actual build
   brCore brMath brGraphics # this are other required libs
)

>Mit freundlichen Grüßen
>
Christian Heine

T-Systems on site services GmbH
Procurement Systems

>Telefon/phone: +49-5361-9-78564
>E-Mail: extern.christian.he...@volkswagen.de
>


Christian Heine
Consultant
Alessandro-Volta-Straße 11, 38440 Wolfsburg
+49-5361-464 78-x (Tel.)
+49-5361-464 78-10 (Fax)
E-Mail: christian.he...@t-systems.com
Internet: http://www.t-systems-onsite.de 

Geschäftsführung: Stefan Kappe, Georg Rätker
Handelsregister: Amtsgericht Berlin HRB 51336
Sitz der Gesellschaft: Berlin
Ust.-Id Nr. DE 181 120 485



Notice: This transmittal and/or attachments may be privileged or confidential. 
If you are not the intended recipient, you are hereby notified that you have 
received this transmittal in error; any review, dissemination, or copying is 
strictly prohibited. If you received this transmittal in error, please notify 
us immediately by reply and immediately delete this message and all its 
attachments. Thank you.

-Ursprüngliche Nachricht-
Von: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] Im Auftrag von 
Rolf Eike Beer
Gesendet: Donnerstag, 12. Mai 2011 13:39
An: cmake@cmake.org
Betreff: Re: [CMake] How to invoke a separate build with CMAKE_CUSTOM_TARGET?

Am Donnerstag, 12. Mai 2011, 12:40:54 schrieb Heine, Christian:
> Thanks Eike for this hint! This works, but I couldn't use it.
> 
> One reason is, that any module is loosely coupled. It doesn't know where the
> other modules it's depends on are located. By this reason I need a place
> where any final library is archived and could be linked by the executable
> at runtime like the /usr/local/lib folder on Linux, so I think the system32
> folder is the right place on windows platforms ...
> 
> The second reason is, that I've to perform an installation before I could
> start the demo files. But normally I would start them before I install the
> module, i.e. to test implementation details. By this reason the demo
> executable must be able to link the actual library after a simple build...

SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

This will create a lib and bin folder inside your build tree where all things 
will be located so it should be possible to run things just from the build 
tree. BTDT. MT.

Eike
___
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] Parameters of functions

2011-05-12 Thread Glenn Coombs
If you really wanted to pass the name of the variable in rather than the
value, then as Rolf says the behaviour you get is as expected.  The only way
round that would be to rename var in the function to something guaranteed
not to be the name of a variable that you ever tried to pass in.

Or you could use a macro instead:

MACRO(buildm var)
   MESSAGE(STATUS "var: " ${${var}})
ENDMACRO()

SET(var red blue yellow green)
buildm(var)

-- var: redblueyellowgreen

--
Glenn


On 12 May 2011 13:21, Micha Renner  wrote:

> Am Donnerstag, den 12.05.2011, 11:50 +0100 schrieb Glenn Coombs:
> > I think you probably wanted to write and call your function like this:
> >
> > FUNCTION(build var)
> >MESSAGE(STATUS "var: ${var}")
> > ENDFUNCTION(build)
> >
> > SET(var red blue yellow green)
> > build("${var}")
> >
> > That prints out as you would expect:
> >
> > -- var: red;blue;yellow;green
> >
> Both versions are possible.
> My point was, that in the case I described, the name of the parameter of
> the function may not be the same as the name of variable the function is
> called.
>
> With your version you don't have this problem.
> Thanks.
>
> Micha
>
>
>
> ___
> 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

Re: [CMake] Parameters of functions

2011-05-12 Thread Michael Wild
I agree, that this behaviour is due the fact that the parameter name
"var" hides the parent-scope variable "var", but then ${${var}} should
IMHO result in an error or warning message. Essentially, what this does
inside the function is

set(var var)

which is hardly ever what is intended. This could be fairly easily
detected and warned about.

There should be a way to safely reference parent-scope variables, e.g.
$PARENT_SCOPE{var}.

Michael

On 05/12/2011 05:00 PM, Glenn Coombs wrote:
> If you really wanted to pass the name of the variable in rather than the
> value, then as Rolf says the behaviour you get is as expected.  The only way
> round that would be to rename var in the function to something guaranteed
> not to be the name of a variable that you ever tried to pass in.
> 
> Or you could use a macro instead:
> 
> MACRO(buildm var)
>MESSAGE(STATUS "var: " ${${var}})
> ENDMACRO()
> 
> SET(var red blue yellow green)
> buildm(var)
> 
> -- var: redblueyellowgreen
> 
> --
> Glenn
> 
> 
> On 12 May 2011 13:21, Micha Renner  wrote:
> 
>> Am Donnerstag, den 12.05.2011, 11:50 +0100 schrieb Glenn Coombs:
>>> I think you probably wanted to write and call your function like this:
>>>
>>> FUNCTION(build var)
>>>MESSAGE(STATUS "var: ${var}")
>>> ENDFUNCTION(build)
>>>
>>> SET(var red blue yellow green)
>>> build("${var}")
>>>
>>> That prints out as you would expect:
>>>
>>> -- var: red;blue;yellow;green
>>>
>> Both versions are possible.
>> My point was, that in the case I described, the name of the parameter of
>> the function may not be the same as the name of variable the function is
>> called.
>>
>> With your version you don't have this problem.
>> Thanks.
>>
>> Micha

___
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] How to invoke a separate build with CMAKE_CUSTOM_TARGET?

2011-05-12 Thread Rolf Eike Beer
Am Donnerstag, 12. Mai 2011, 14:51:42 schrieb Heine, Christian:
> Hmm, this is strange. I've followed your instructions, but those take no
> effect. When i try to run the executable I got the failure message box that
> my libbrOpenGL.dll of the acutal build result is missing. Here is what I do
> on demo build:
> 
> INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}
>   ${CMAKE_CURRENT_SOURCE_DIR}
> ${CMAKE_SOURCE_DIR}/include
> ${COMPILER_ROOT}/include/binrev
> )
> 
> # Find OpenGL library using default CMake find script
> FIND_PACKAGE(OpenGL REQUIRED)
> 
> # create output directory
> SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
> 
> # Make sure the linker can find our libraries once they are built.
> LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib)

This is basically always wrong. Since you usually pass absolute paths to 
target_link_libraries() this doesn't help in any way but may cause trouble. 
Just don't do it.

> # Find our cmake utils with different reusable macros
> FIND_PACKAGE(OpenGL REQUIRED)

You already did that before.

> # create exectuable
> SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)

Since CMAKE_RUNTIME_OUTPUT_DIRECTORY is already set you should not need that 
anymore.

> ADD_EXECUTABLE(mydemo demo_win32Camera.cpp)
> 
> #link test libraries for unit tests
> TARGET_LINK_LIBRARIES( mydemo
>  brOpenGL  # this is the library of the actual build
>  brCore brMath brGraphics # this are other required 
libs
> )

These br* things are be created by add_library(... shared ...) in your 
project, no? Then this should work if you had previously set 
CMAKE_LIBRARY_OUTPUT_DIRECTORY to bin or so.

Eike

signature.asc
Description: This is a digitally signed message part.
___
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] Merging CTest results

2011-05-12 Thread Neil Chittenden

Hi

Background:
I've run a set of tests using:

  ctest -D ExperimentalTest

(i.e. delaying the CDash submit)
These tests take a long time to complete. Now I notice one of the tests 
failed because I forgot to update it after a change to my program.


I can re-run that particular test using something like:

  ctest -D ExperimentalTest -R my-test-to-rerun

As this test now results in a pass (after being corrected), is it 
possible to easily merge CTest results before submitting to CDash? (I 
guess doing the submit using 'make ExperimentalSubmit')


Or will I have to rerun all the tests? (which takes a long time!)

I do realise that as the file being submitted is XML-based, it probably 
isn't too difficult to manually merge them but if CMake/CTest already 
has the functionality I may as well use that!


Cheers
---
Neil
___
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] How do you go about building the cmake-gui from source in 2.8.4?

2011-05-12 Thread Dick Munroe
The title pretty much says it all.  I can't find anything obvious in the 
source tree and I want to rebuild cmake-gui for windows.


tia,

Dick Munroe
___
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] Problem with pkg_check_modules and imlib2

2011-05-12 Thread David Demelier

Hello,

I have some trouble to link my project to the imlib2 library. The 
library is installed correctly and a command like :


gcc test.c -o test `pkg-config --libs --cflags imlib2`

works and link to imlib2.

I have this CMakeLists.txt http://markand.malikania.fr/CMakeLists.txt 
but it does not work, as you can see it detects fine the library dirs 
and include dirs :


markand@Melon ~/devel/wmfs/build $ cmake ..
-- INFO: XDG_CONFIG_DIR set /usr/local/etc/
-- INFO: imlib2 enabled
-- INFO: imlib2 under /usr/local/include;/usr/local/include/freetype2
-- INFO: imlib2 under /usr/local/lib
-- INFO: imlib2 under Imlib2

But it does not link :

markand@Melon ~/devel/wmfs/build $ make
Linking C executable wmfs
/usr/bin/ld: cannot find -lImlib2

What am I doing wrong? Also the CMakeCache is set with the good parameters :

[...]
IMLIB2_INCLUDEDIR:INTERNAL=/usr/local/include
IMLIB2_INCLUDE_DIRS:INTERNAL=/usr/local/include;/usr/local/include/freetype2
IMLIB2_LIBRARIES:INTERNAL=Imlib2
IMLIB2_LIBRARY_DIRS:INTERNAL=/usr/local/lib
IMLIB2_LDFLAGS:INTERNAL=-L/usr/local/lib;-lImlib2
[...]

Cheers,
--
David Demelier
___
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] IMPORTED / EXPORTED targets

2011-05-12 Thread Jérémy Coulon

Hello,

I'm currently playing with imported / exported targets.
Let's say I build a project A for both static and shared variants.
A depends on a 3rd party static library called B.
Internally, B depends on another static library called C.

My project A builds fine.
But when I try to export my targets it seems like the dependency graph 
is not correct.

Thus I probably won't be able to use A in another project.

See attached CMakeLists.txt to see how I import / export targets.

For target A_SHARED everything looks OK.
But I would expect that for target A_STATIC the following property
IMPORTED_LINK_INTERFACE_LIBRARIES_NOCONFIG "B_STATIC;C_STATIC"
but the "C_STATIC" dependency is missing from the generated 
MyExports-noconfig.cmake


Please, can you tell me if there is something wrong in my cmake script ?
What is the expected behavior ?

Thanks.

Jérémy


FBar.tar.gz
Description: application/gzip
cmake_minimum_required(VERSION 2.8)

project(A C)

add_library(C_STATIC STATIC IMPORTED)
set_target_properties(C_STATIC PROPERTIES
  IMPORTED_LINK_INTERFACE_LANGUAGES "C"
  IMPORTED_LOCATION "/usr/lib/libz.a"
)

add_library(B_STATIC STATIC IMPORTED)
set_target_properties(B_STATIC PROPERTIES
  IMPORTED_LINK_INTERFACE_LANGUAGES "C"
  IMPORTED_LINK_INTERFACE_LIBRARIES "C_STATIC"
  IMPORTED_LOCATION "/usr/lib/libpng12.a"
)

add_library(A_STATIC STATIC foo.c)
target_link_libraries(A_STATIC B_STATIC)

add_library(A_SHARED SHARED foo.c)
target_link_libraries(A_SHARED B_STATIC)
set_target_properties(A_SHARED PROPERTIES
  LINK_INTERFACE_LIBRARIES ""
)

install(TARGETS A_STATIC A_SHARED 
  EXPORT MyExports
  DESTINATION "./lib"
)
install(EXPORT MyExports
  DESTINATION "./share"
)
___
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] How do you go about building the cmake-gui from source in 2.8.4?

2011-05-12 Thread clin...@elemtech.com
It is under Source/QtDialog and the cmake option has QtDialog in its name.

Clint

- Reply message -
From: "Dick Munroe" 
Date: Thu, May 12, 2011 11:07 am
Subject: [CMake] How do you go about building the cmake-gui from source in  
2.8.4?
To: 

The title pretty much says it all.  I can't find anything obvious in the 
source tree and I want to rebuild cmake-gui for windows.

tia,

Dick Munroe
___
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

Re: [CMake] Parameters of functions

2011-05-12 Thread Micha Renner
Am Donnerstag, den 12.05.2011, 17:10 +0200 schrieb Michael Wild:
> I agree, that this behaviour is due the fact that the parameter name
> "var" hides the parent-scope variable "var", but then ${${var}} should
> IMHO result in an error or warning message. Essentially, what this does
> inside the function is
> 
> set(var var)
> 
> which is hardly ever what is intended. 

Okay, now I understand it.

Thanks very much to all of you!

Micha


___
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] How to invoke a separate build with CMAKE_CUSTOM_TARGET?

2011-05-12 Thread Heine, Christian (EXTERN: VWGEDS)
I've followed your instructions, removed the obsolete lines but
no effect, the libbrOpenGL.dll which is located at ./lib is still 
missing on startup ...  

The br* stuff are my dependencies library which I've created 
and installed separatelly, not in context of the actual project.
The resulting dll's of those modules are installed to system32
folder.

What I've figured out is, that anything works if I place the 
libbrOpenGL.dll directly in the module/cmake root folder and
not at lib subdirectory ...

>Mit freundlichen Grüßen
>
Christian Heine

T-Systems on site services GmbH
Procurement Systems

>Telefon/phone: +49-5361-9-78564
>E-Mail: extern.christian.he...@volkswagen.de
>


Christian Heine
Consultant
Alessandro-Volta-Straße 11, 38440 Wolfsburg
+49-5361-464 78-x (Tel.)
+49-5361-464 78-10 (Fax)
E-Mail: christian.he...@t-systems.com
Internet: http://www.t-systems-onsite.de 

Geschäftsführung: Stefan Kappe, Georg Rätker
Handelsregister: Amtsgericht Berlin HRB 51336
Sitz der Gesellschaft: Berlin
Ust.-Id Nr. DE 181 120 485



Notice: This transmittal and/or attachments may be privileged or confidential. 
If you are not the intended recipient, you are hereby notified that you have 
received this transmittal in error; any review, dissemination, or copying is 
strictly prohibited. If you received this transmittal in error, please notify 
us immediately by reply and immediately delete this message and all its 
attachments. Thank you.

-Ursprüngliche Nachricht-
Von: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] Im Auftrag von 
Rolf Eike Beer
Gesendet: Donnerstag, 12. Mai 2011 17:29
An: cmake@cmake.org
Betreff: Re: [CMake] How to invoke a separate build with CMAKE_CUSTOM_TARGET?

Am Donnerstag, 12. Mai 2011, 14:51:42 schrieb Heine, Christian:
> Hmm, this is strange. I've followed your instructions, but those take no
> effect. When i try to run the executable I got the failure message box that
> my libbrOpenGL.dll of the acutal build result is missing. Here is what I do
> on demo build:
> 
> INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}
>   ${CMAKE_CURRENT_SOURCE_DIR}
> ${CMAKE_SOURCE_DIR}/include
> ${COMPILER_ROOT}/include/binrev
> )
> 
> # Find OpenGL library using default CMake find script
> FIND_PACKAGE(OpenGL REQUIRED)
> 
> # create output directory
> SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
> 
> # Make sure the linker can find our libraries once they are built.
> LINK_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib)

This is basically always wrong. Since you usually pass absolute paths to 
target_link_libraries() this doesn't help in any way but may cause trouble. 
Just don't do it.

> # Find our cmake utils with different reusable macros
> FIND_PACKAGE(OpenGL REQUIRED)

You already did that before.

> # create exectuable
> SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)

Since CMAKE_RUNTIME_OUTPUT_DIRECTORY is already set you should not need that 
anymore.

> ADD_EXECUTABLE(mydemo demo_win32Camera.cpp)
> 
> #link test libraries for unit tests
> TARGET_LINK_LIBRARIES( mydemo
>  brOpenGL  # this is the library of the actual build
>  brCore brMath brGraphics # this are other required 
libs
> )

These br* things are be created by add_library(... shared ...) in your 
project, no? Then this should work if you had previously set 
CMAKE_LIBRARY_OUTPUT_DIRECTORY to bin or so.

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