Re: [CMake] How to add CMake includes and libraries to Visual Studio Solution?

2012-01-16 Thread Andreas Pakulat
On 16.01.12 21:03:20, J Decker wrote:
> On Mon, Jan 16, 2012 at 10:21 AM, John Drescher  wrote:
> > On Mon, Jan 16, 2012 at 1:15 PM, J Decker  wrote:
> >> On Mon, Jan 16, 2012 at 10:08 AM, Rolf Eike Beer  wrote:
> >>> J Decker wrote:
>  I just use
>  include_directories( ... )
> >>>
> >>> This is right.
> >>>
>  LINK_DIRECTORIES( ...} )
> >>>
> >>> This is almost surely wrong. LINK_DIRECTORIES is only needed for very 
> >>> seldom
> >>> special cases and only causes headache in all other cases.
> >>
> >> oh, what's the preferred method to specify the directory where the
> >> library is then?
> >>
> >
> > I believe the full path on the target_link_libraries.
> 
> I think the problem with that is if built with gcc, then the full path
> to the library is encoded and you can't load the library from the
> library path, but only from where it was specified.

Thats not correct. Runtime loading of libraries depends on the runtime linker
used, which is ld on Linux usually. And that one finds libraries by
checking its ld.so.conf, the LD_LIBRARY_PATH and a possibly-existing
RPATH/RUNPATH setting in the executable. On Windows the runtime-linker
looks through the PATH variable, in the directory where the executable
is and at a few system-places.

What you might refer to is CMake's support for RPATH/RUNPATH on Linux,
but this can be turned off, tuned so the path is relative to the
executable and the linker simply ignores that if it cannot find a
library at the specified place and falls back to the other two options.

Andreas

--

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] Creating the resource-only dll with NMake

2012-01-16 Thread Kozlovskiy, Alexey
Thanks for support!
I specified the SET_TARGET_PROPERTIES (${PROJECT_NAME} PROPERTIES 
LINKER_LANGUAGE "CXX" ) and error was disappear.

Another question is: How to specify the "Culture" properties? In the VS it 
could be find in the Property Pages -> Resources -> General -> Culture
Thanks again!

Regards,
Alexey

-Original Message-
From: Yuri Timenkov [mailto:y...@timenkov.ru] 
Sent: Tuesday, January 17, 2012 7:28 AM
To: Kozlovskiy, Alexey
Cc: cmake@cmake.org
Subject: Re: [CMake] Creating the resource-only dll with NMake

Won't it work if you set target's linker language to C or C++? I suppose it's a 
LINKER_LANGUAGE property.

On Mon, Jan 16, 2012 at 6:17 PM, Kozlovskiy, Alexey 
 wrote:
>
> Hi,
>
>
>
> I tried to create a simple CMake project to assemble a resource only dll. My 
> CMakeList.txt file:
>
> cmake_minimum_required(VERSION 2.8)
>
> set (PROJECT_NAME viewerResDLL)
>
> project ( ${PROJECT_NAME} )
>
> set ( SRCS_MAIN
>
>    viewerres_en.rc
>
>    )
>
> set ( HDRS_MAIN
>
>    resource.h
>
>    )
>
> add_library ( ${PROJECT_NAME} SHARED ${SRCS_MAIN} ${HDRS_MAIN} )
>
> SET_TARGET_PROPERTIES (${PROJECT_NAME} PROPERTIES LINK_FLAGS 
> "/MANIFEST:NO /NODEFAULTLIB /NOENTRY" )
>
>
>
> I execute CMake with the following flags:
>
> cmake -DCMAKE_BUILD_TYPE=Release -G"NMake Makefiles"
>
>
>
> and receive the following error:
>
> -- Configuring done
>
> CMake Error: Error required internal CMake variable not set, cmake may be not 
> be built correctly.
>
> Missing variable is:
>
> CMAKE_RC_CREATE_SHARED_LIBRARY
>
> -- Generating done
>
>
>
> “Nmake all” command finished without any errors, but in the same time without 
> any results - viewerResDLL.dll not created.
>
> If I use the “Visual Studio 9 2008 Win64” generator all looks working 
> correct and I’m able to build viewerResDLL.dll
>
>
>
> Any help will be very appreciated…
>
> Thanks!
>
>
>
> Regards,
>
> Alexey
>
>
>
>
> --
>
> 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 add CMake includes and libraries to Visual Studio Solution?

2012-01-16 Thread J Decker
On Mon, Jan 16, 2012 at 10:21 AM, John Drescher  wrote:
> On Mon, Jan 16, 2012 at 1:15 PM, J Decker  wrote:
>> On Mon, Jan 16, 2012 at 10:08 AM, Rolf Eike Beer  wrote:
>>> J Decker wrote:
 I just use
 include_directories( ... )
>>>
>>> This is right.
>>>
 LINK_DIRECTORIES( ...} )
>>>
>>> This is almost surely wrong. LINK_DIRECTORIES is only needed for very seldom
>>> special cases and only causes headache in all other cases.
>>
>> oh, what's the preferred method to specify the directory where the
>> library is then?
>>
>
> I believe the full path on the target_link_libraries.

I think the problem with that is if built with gcc, then the full path
to the library is encoded and you can't load the library from the
library path, but only from where it was specified.

>
> John
--

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] Creating the resource-only dll with NMake

2012-01-16 Thread Yuri Timenkov
Won't it work if you set target's linker language to C or C++? I
suppose it's a LINKER_LANGUAGE property.

On Mon, Jan 16, 2012 at 6:17 PM, Kozlovskiy, Alexey
 wrote:
>
> Hi,
>
>
>
> I tried to create a simple CMake project to assemble a resource only dll. My 
> CMakeList.txt file:
>
> cmake_minimum_required(VERSION 2.8)
>
> set (PROJECT_NAME viewerResDLL)
>
> project ( ${PROJECT_NAME} )
>
> set ( SRCS_MAIN
>
>    viewerres_en.rc
>
>    )
>
> set ( HDRS_MAIN
>
>    resource.h
>
>    )
>
> add_library ( ${PROJECT_NAME} SHARED ${SRCS_MAIN} ${HDRS_MAIN} )
>
> SET_TARGET_PROPERTIES (${PROJECT_NAME} PROPERTIES LINK_FLAGS "/MANIFEST:NO 
> /NODEFAULTLIB /NOENTRY" )
>
>
>
> I execute CMake with the following flags:
>
> cmake -DCMAKE_BUILD_TYPE=Release -G"NMake Makefiles"
>
>
>
> and receive the following error:
>
> -- Configuring done
>
> CMake Error: Error required internal CMake variable not set, cmake may be not 
> be built correctly.
>
> Missing variable is:
>
> CMAKE_RC_CREATE_SHARED_LIBRARY
>
> -- Generating done
>
>
>
> “Nmake all” command finished without any errors, but in the same time without 
> any results - viewerResDLL.dll not created.
>
> If I use the “Visual Studio 9 2008 Win64” generator all looks working correct 
> and I’m able to build viewerResDLL.dll
>
>
>
> Any help will be very appreciated…
>
> Thanks!
>
>
>
> Regards,
>
> Alexey
>
>
>
>
> --
>
> 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 add CMake includes and libraries to Visual Studio Solution?

2012-01-16 Thread hellhound
Thanks for support. Anything is working fine as described by you.
I've only checked the wrong solution folders ...

- Original Message -
From: e...@sf-mail.de
To: cmake@cmake.org
Date: 16.01.2012 21:01:37
Subject: Re: [CMake] How to add CMake includes and libraries to Visual Studio 
Solution?


> hellho...@binary-revolution.org wrote:
>> Hmm this is strange, INCLUDE_DIRECTORIES is used but no effect.
>> I try to set:
>> 
>>  INCLUDE_DIRECTORIES("C:/binrev/development/boost/1.47/")
> 
> Should be INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}), no? We have such a 
> shiny 
> FindBoost.cmake that does all the work for you ;)

Yes it should be and it is, this was only for simple test... 

>> But the additional directory entry of my MSVC solution holds only
>> the default settings:
>> 
>> $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include
>> ;$(FrameworkSDKDir)\include;
>> 
>> Is there any chance that i could check if INCLUDE_DIRECORIES is
>> set correctly by CMake? Maybe the settings are truncated by visual
>> studio ..
> 
> You need to use INCLUDE_DIRECTORIES() before doing the ADD_SUBDIRECTORY(), 
> ADD_EXECUTABLE(), or ADD_LIBRARY() that should use it.
> 
> 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] Bug fix requests for the *next* release of CMake...

2012-01-16 Thread Alexander Neundorf
On Monday 16 January 2012, Abdelrazak Younes wrote:
> http://public.kitware.com/Bug/view.php?id=12614


It's on my list, but I can't prmise I'll be able to do it for 2.8.8.

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] How to add CMake includes and libraries to Visual Studio Solution?

2012-01-16 Thread Rolf Eike Beer
hellho...@binary-revolution.org wrote:
> Hmm this is strange, INCLUDE_DIRECTORIES is used but no effect.
> I try to set:
> 
>  INCLUDE_DIRECTORIES("C:/binrev/development/boost/1.47/")

Should be INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}), no? We have such a shiny 
FindBoost.cmake that does all the work for you ;)

> But the additional directory entry of my MSVC solution holds only
> the default settings:
> 
> $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include
> ;$(FrameworkSDKDir)\include;
> 
> Is there any chance that i could check if INCLUDE_DIRECORIES is
> set correctly by CMake? Maybe the settings are truncated by visual
> studio ..

You need to use INCLUDE_DIRECTORIES() before doing the ADD_SUBDIRECTORY(), 
ADD_EXECUTABLE(), or ADD_LIBRARY() that should use it.

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] How to add CMake includes and libraries to Visual Studio Solution?

2012-01-16 Thread hellhound
Ahh ok. I see the failure. You are right, those files are added, but to an 
other tab at the solution,
I think you checked C++ --> General --> Additional includes ... 

I've checkedd poperties -> VC++ Directories --> Include Directories. Is it 
possible to set any 
required value here (includes, libraries)? I've to set the libraries here or at 
the linker --> 
general --> additional libraries directory to get my code compilable ...



- Original Message -
From: d3c...@gmail.com
To: e...@sf-mail.de
Date: 16.01.2012 19:15:50
Subject: Re: [CMake] How to add CMake includes and libraries to Visual Studio 
Solution?


> On Mon, Jan 16, 2012 at 10:08 AM, Rolf Eike Beer  wrote:
>> J Decker wrote:
>>> I just use
>>> include_directories( ... )
>> 
>> This is right.
>> 
>>> LINK_DIRECTORIES( ...} )
>> 
>> This is almost surely wrong. LINK_DIRECTORIES is only needed for very seldom
>> special cases and only causes headache in all other cases.
> 
> oh, what's the preferred method to specify the directory where the
> library is then?
> 
>> 
>> 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




--

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 add CMake includes and libraries to Visual Studio Solution?

2012-01-16 Thread John Drescher
On Mon, Jan 16, 2012 at 2:44 PM,   wrote:
> Hmm this is strange, INCLUDE_DIRECTORIES is used but no effect.
> I try to set:
>
>  INCLUDE_DIRECTORIES("C:/binrev/development/boost/1.47/")
>
> But the additional directory entry of my MSVC solution holds only
> the default settings:
>
> $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;
>
> Is there any chance that i could check if INCLUDE_DIRECORIES is
> set correctly by CMake? Maybe the settings are truncated by visual
> studio ..
>

Is the project being regenerated and reloaded after the change?

-- 
John M. Drescher
--

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 add CMake includes and libraries to Visual Studio Solution?

2012-01-16 Thread hellhound
Hmm this is strange, INCLUDE_DIRECTORIES is used but no effect.
I try to set:

 INCLUDE_DIRECTORIES("C:/binrev/development/boost/1.47/")

But the additional directory entry of my MSVC solution holds only
the default settings:

$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;

Is there any chance that i could check if INCLUDE_DIRECORIES is
set correctly by CMake? Maybe the settings are truncated by visual
studio ..




- Original Message -
From: d3c...@gmail.com
To: e...@sf-mail.de
Date: 16.01.2012 19:15:50
Subject: Re: [CMake] How to add CMake includes and libraries to Visual Studio 
Solution?


> On Mon, Jan 16, 2012 at 10:08 AM, Rolf Eike Beer  wrote:
>> J Decker wrote:
>>> I just use
>>> include_directories( ... )
>> 
>> This is right.
>> 
>>> LINK_DIRECTORIES( ...} )
>> 
>> This is almost surely wrong. LINK_DIRECTORIES is only needed for very seldom
>> special cases and only causes headache in all other cases.
> 
> oh, what's the preferred method to specify the directory where the
> library is then?
> 
>> 
>> 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




--

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 add CMake includes and libraries to Visual Studio Solution?

2012-01-16 Thread John Drescher
On Mon, Jan 16, 2012 at 1:15 PM, J Decker  wrote:
> On Mon, Jan 16, 2012 at 10:08 AM, Rolf Eike Beer  wrote:
>> J Decker wrote:
>>> I just use
>>> include_directories( ... )
>>
>> This is right.
>>
>>> LINK_DIRECTORIES( ...} )
>>
>> This is almost surely wrong. LINK_DIRECTORIES is only needed for very seldom
>> special cases and only causes headache in all other cases.
>
> oh, what's the preferred method to specify the directory where the
> library is then?
>

I believe the full path on the target_link_libraries.

John
--

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 add CMake includes and libraries to Visual Studio Solution?

2012-01-16 Thread J Decker
On Mon, Jan 16, 2012 at 10:08 AM, Rolf Eike Beer  wrote:
> J Decker wrote:
>> I just use
>> include_directories( ... )
>
> This is right.
>
>> LINK_DIRECTORIES( ...} )
>
> This is almost surely wrong. LINK_DIRECTORIES is only needed for very seldom
> special cases and only causes headache in all other cases.

oh, what's the preferred method to specify the directory where the
library is then?

>
> 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 add CMake includes and libraries to Visual Studio Solution?

2012-01-16 Thread Rolf Eike Beer
J Decker wrote:
> I just use
> include_directories( ... )

This is right.

> LINK_DIRECTORIES( ...} )

This is almost surely wrong. LINK_DIRECTORIES is only needed for very seldom 
special cases and only causes headache in all other cases.

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] parallel make -j N

2012-01-16 Thread Bill Hoffman

On 1/16/2012 12:10 PM, Andrea Galeazzi wrote:

I generated a MakeFile Project (MinGW) and I'd like to speed up the
build process using -j N option. So I launched:
"make -j 2 all".
Unfortunately I noticed that the Makefile, generated by CMake self,
contains this row: $(MAKE) -f CMakeFiles\Makefile2 all , so Makefile2
won't be executed in parallel mode.
How can I pass this option to all build steps?
--

gmake will do the right thing.  when you run a toplevel make with -j2 it 
will set an env var that is passed down to the $(MAKE) and it should 
work.  I use it all the time.


-Bill

--

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] parallel make -j N

2012-01-16 Thread Andrea Galeazzi
I generated a MakeFile Project (MinGW) and I'd like to speed up the 
build process using -j N option. So I launched:

"make -j 2 all".
Unfortunately I noticed that the Makefile, generated by CMake self, 
contains this row: $(MAKE) -f CMakeFiles\Makefile2 all , so Makefile2 
won't be executed in parallel mode.

How can I pass this option to all build steps?
--

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 add CMake includes and libraries to Visual Studio Solution?

2012-01-16 Thread John Drescher
> Where did you define your INCLUDE_DIRECTORIES? I also tried to set an absolute
> path instead of using the CMake list, same result. Nothing is set...

For me this works as well. Define  INCLUDE_DIRECTORIES anywhere above
the ADD_EXECUTABLE or ADD_LIBRARY and visual studio will use it.

-- 
John M. Drescher
--

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 add CMake includes and libraries to Visual Studio Solution?

2012-01-16 Thread hellhound
Where did you define your INCLUDE_DIRECTORIES? I also tried to set an absolute
path instead of using the CMake list, same result. Nothing is set...

Here is the link to the complete cmake file:
http://binrevengine.svn.sourceforge.net/viewvc/binrevengine/modules/brGraphics/branches/hellhound-dev/CMakeLists.txt?revision=1039&view=markup

The additional cmake scripts could be found here:
http://binrevengine.svn.sourceforge.net/viewvc/binrevengine/data/cmake/


 Original Message -
From: d3c...@gmail.com
To: hellho...@binary-revolution.org
Date: 16.01.2012 17:13:18
Subject: Re: [CMake] How to add CMake includes and libraries to Visual Studio 
Solution?


> I just use
> include_directories( ... )
> LINK_DIRECTORIES( ...} )
> 
> which works fine for specifying additional directories for that
> project and all sub projects included.
> 
> On Mon, Jan 16, 2012 at 7:24 AM,   wrote:
>> I use CMake to generate a Visual Studio 2010 project and solution file. 
>> Actually I could set different settings, like warning level, incremental 
>> building flag ect. from CMake. But I can't set additional includes and 
>> libraries, listed in the VC++ Directory configuration tab.
>> 
>> For GCC projects anything is running fine and I could compile and link the 
>> project. For MSVC I've
>> to add those directories manually to perform a compile and link. But this is 
>> stupid and boring...
>> 
>> I tried to set the following CMake variables:
>> 
>>   INCLUDE_DIRECTORIES
>>   LINK_DIRECTORIES
>>   CMAKE_INCLUDE_PATH
>> 
>> but nothing happend. If i open the project, the additional include directory 
>> of the solution is always empty (only standard MSVE settings are given). I 
>> tired to set this variables after executable creation, but this has also no 
>> effect.
>> 
>> I also tried to set the MSVC environment variables INCLUDE and PATH with 
>> SET(ENV${PATH} "c:\test\...\") but this also has no effect. The directories 
>> of the MSVC solution are empty.
>> 
>> This is what i do directly in the header of the cmake file:
>> 
>> CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
>> PROJECT(${MODULE_NAME})
>> IF (MSVC)
>>   # Activate C++ exception handling
>>   IF (NOT CMAKE_CXX_FLAGS MATCHES "/EHsc")
>>   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
>>   ENDIF ()
>> 
>>   # Set Warning level always to 4
>>   IF (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
>>     string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS 
>> "${CMAKE_CXX_FLAGS}")
>>   ELSE ()
>>     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
>>   ENDIF ()
>> 
>>   #read path of dependency modules
>>   file(READ "msvc.deps" MSVC_PROPERTIES)
>>   STRING(REGEX REPLACE ";" ";" MSVC_PROPERTIES "${MSVC_PROPERTIES}")
>>   STRING(REGEX REPLACE "\n" ";" MSVC_PROPERTIES "${MSVC_PROPERTIES}")
>> 
>>   FOREACH(e ${MSVC_PROPERTIES})
>>     SET(INCLUDE ${INCLUDE} ${e})
>>     MESSAGE(STATUS "[INFO]: Value ${e}")
>>   ENDFOREACH(e)
>>   INCLUDE_DIRECTORIES(${INCLUDE})
>> ENDIF ()
>> 
>> In the .deps file I've added to path of my dependeny modules, line separated:
>> 
>> c:\binrev\development\boost\1.47\includes
>> c:\binrev\repository\modules\brCore\trunk\includes
>> 
>> Both are read successfully but couldn't be set as additional include 
>> directory in my MSVC solution.
>> 
>> Best regards, Hellhound
>> 
>> 
>> 
>> 
>> --
>> 
>> 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] CPack-NSIS component-based installer lacking components page...might I be forgetting something?

2012-01-16 Thread Patrick Ryan
Hi Eric,

Thanks for the response. I should clarify that the application we're
building is ParaView.

On Fri, Jan 13, 2012 at 5:13 PM, Eric Noulard  wrote:
> 2012/1/13 Patrick Ryan :
>> Hi,
>>
>> I'm using CMake 2.8.6 to generate an NSIS installer. We have two
>> separate projects; an application and a set of plugins to be used by
>> the application. The plugins are composed of four separate components
>> that can be selected during the installation (Filters, NonBSDPlugins,
>> Readers, Writers). When built on its own, the plugins installer
>> includes the 'Select Components' page as expected. When building the
>> application, which also includes the plugins project, no components
>> page appears.
>
> How does the application "includes" the plugins project?
>
We have the following line including our Plugins directory:

ADD_SUBDIRECTORY(PVGPlugins)
>
>> My CPackConfig.cmake file has the following:
>>
>> SET(CPACK_COMPONENTS_ALL
>> "BrandedRuntime;Development;Filters;NonBSDPlugins;Readers;Writers;Runtime;RuntimeLibraries;Unspecified")
>>
>> SET(CPACK_COMPONENT_UNSPECIFIED_HIDDEN "TRUE")
>>
>> SET(CPACK_COMPONENT_UNSPECIFIED_REQUIRED "TRUE")
>>
>> Am I missing anything blatantly obvious? I'm quite stuck and haven't
>> been able to find anyone who's had a similar problem.
>
> CPack does not work that well for
> "multiple project in one package" installer.
>
> see discussion here
> http://public.kitware.com/Bug/view.php?id=11808
>
>> I can provide more details if necessary...apologies if I haven't
>> included enough.
>
> Was your CPackConfig.cmake written by hand or generated
> with include(CPack) ?
>
It was generated.
>
> Did you include(CPack) twice?

>
> Like one time in the application project and one time in the plugins project?
> If yes tries to include it only once.
>
We include it in the Plugins project CMakeList but it is only called
if we are building the Plugins project. That said, we haven't been
able to find the 'other' include(CPack) in any of ParaView's
cmakelists.
>
> see related bugs with multiple CPack inclusion:
> http://public.kitware.com/Bug/view.php?id=10751
>
> --
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org

Our Plugins project's CMakeList has a conditional to look for
ParaView's source directory. If it's found (building the entire
application) this is all that's being called:

ADD_SUBDIRECTORY(Filters)
ADD_SUBDIRECTORY(Readers)
ADD_SUBDIRECTORY(Writers)
ADD_SUBDIRECTORY(NonBSDPlugins)
set(CPACK_COMPONENTS_ALL PVGFilters PVGReaders PVGWriters PVGNonBSDPlugins)

This is what's not working for us. Below is what is called when we
aren't building the entire application. This is working as we expect.

PROJECT(PVGPlugins)
FIND_PACKAGE(ParaView REQUIRED)
INCLUDE(${PARAVIEW_USE_FILE})

SET (PVGPlugins_VERSION_MAJOR 1)
SET (PVGPlugins_VERSION_MINOR 0)
SET (PVGPlugins_VERSION_PATCH 0)

SET(PVGPlugins_VERSION
"${PVGPlugins_VERSION_MAJOR}.${PVGPlugins_VERSION_MINOR}")
SET(PVGPlugins_VERSION_FULL "${PVGPlugins_VERSION}.${PVGPlugins_VERSION_PATCH}")

SET(PVGPlugins_INSTALL_BIN_DIR bin)

SET(QT_USE_QTUITOOLS TRUE)
SET(QT_USE_QTXML TRUE)  # uitools depends on xml
SET(QT_USE_QTSQL TRUE) # we need sql drivers
INCLUDE(${QT_USE_FILE})

INCLUDE_DIRECTORIES(${QT_QTSQL_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${QT_QTXML_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${QT_QTUITOOLS_INCLUDE_DIR})

OPTION(ParaViewGeo_Filters "Build ParaViewGeo Filters" ON)
OPTION(ParaViewGeo_Readers "Build ParaViewGeo Readers" ON)
OPTION(ParaViewGeo_Writers "Build ParaViewGeo Writers" ON)
OPTION(ParaViewGeo_NonBSDPlugins "Build ParaViewGeo Non-BSD Licensed
Plugins" OFF)

IF (ParaViewGeo_Filters)
ADD_SUBDIRECTORY(Filters)
ENDIF(ParaViewGeo_Filters)

IF (ParaViewGeo_Readers)
ADD_SUBDIRECTORY(Readers)
ENDIF(ParaViewGeo_Readers)

IF(ParaViewGeo_Writers)
ADD_SUBDIRECTORY(Writers)
ENDIF(ParaViewGeo_Writers)

IF(ParaViewGeo_NonBSDPlugins)
ADD_SUBDIRECTORY(NonBSDPlugins)
ENDIF(ParaViewGeo_NonBSDPlugins)

set(CPACK_COMPONENTS_ALL PVGFilters PVGReaders PVGWriters PVGNonBSDPlugins)
set(CPACK_PACKAGE_NAME "ParaViewGeo Plugins")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "ParaViewGeo Plugins")
set(CPACK_PACKAGE_VERSION ${PVGPlugins_VERSION_FULL})
SET(CPACK_RESOURCE_FILE_LICENSE
"${PVGPlugins_SOURCE_DIR}/PVG_PLUGINS_LICENSE.txt")
include (CPack)

Thanks,

-- 
Patrick Ryan
--

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 add CMake includes and libraries to Visual Studio Solution?

2012-01-16 Thread J Decker
I just use
include_directories( ... )
LINK_DIRECTORIES( ...} )

which works fine for specifying additional directories for that
project and all sub projects included.

On Mon, Jan 16, 2012 at 7:24 AM,   wrote:
> I use CMake to generate a Visual Studio 2010 project and solution file. 
> Actually I could set different settings, like warning level, incremental 
> building flag ect. from CMake. But I can't set additional includes and 
> libraries, listed in the VC++ Directory configuration tab.
>
> For GCC projects anything is running fine and I could compile and link the 
> project. For MSVC I've
> to add those directories manually to perform a compile and link. But this is 
> stupid and boring...
>
> I tried to set the following CMake variables:
>
>   INCLUDE_DIRECTORIES
>   LINK_DIRECTORIES
>   CMAKE_INCLUDE_PATH
>
> but nothing happend. If i open the project, the additional include directory 
> of the solution is always empty (only standard MSVE settings are given). I 
> tired to set this variables after executable creation, but this has also no 
> effect.
>
> I also tried to set the MSVC environment variables INCLUDE and PATH with 
> SET(ENV${PATH} "c:\test\...\") but this also has no effect. The directories 
> of the MSVC solution are empty.
>
> This is what i do directly in the header of the cmake file:
>
> CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
> PROJECT(${MODULE_NAME})
> IF (MSVC)
>   # Activate C++ exception handling
>   IF (NOT CMAKE_CXX_FLAGS MATCHES "/EHsc")
>   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
>   ENDIF ()
>
>   # Set Warning level always to 4
>   IF (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
>     string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
>   ELSE ()
>     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
>   ENDIF ()
>
>   #read path of dependency modules
>   file(READ "msvc.deps" MSVC_PROPERTIES)
>   STRING(REGEX REPLACE ";" ";" MSVC_PROPERTIES "${MSVC_PROPERTIES}")
>   STRING(REGEX REPLACE "\n" ";" MSVC_PROPERTIES "${MSVC_PROPERTIES}")
>
>   FOREACH(e ${MSVC_PROPERTIES})
>     SET(INCLUDE ${INCLUDE} ${e})
>     MESSAGE(STATUS "[INFO]: Value ${e}")
>   ENDFOREACH(e)
>   INCLUDE_DIRECTORIES(${INCLUDE})
> ENDIF ()
>
> In the .deps file I've added to path of my dependeny modules, line separated:
>
> c:\binrev\development\boost\1.47\includes
> c:\binrev\repository\modules\brCore\trunk\includes
>
> Both are read successfully but couldn't be set as additional include 
> directory in my MSVC solution.
>
> Best regards, Hellhound
>
>
>
>
> --
>
> 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] Problems finding the SSL library

2012-01-16 Thread Michael Wild
On 01/16/2012 04:59 PM, Maciej (Matchek) Bliziński wrote:
> 2011/12/22 Maciej (Matchek) Bliziński :
>> CMake Error at cmake/ssl.cmake:83 (MESSAGE):
>>  Cannot find appropriate system libraries for SSL.  Use WITH_SSL=bundled to
>>  enable SSL support
>> Call Stack (most recent call first):
>>  CMakeLists.txt:255 (MYSQL_CHECK_SSL)
> 
> I found the MySQL-5.5 source code repository. Is CMakeLists.txt file
> the main one? If so, here's the link:
> 
> http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/CMakeLists.txt
> 
> Another one that seems relevant, is this:
> 
> http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/cmake/ssl.cmake
> 
> Could anyone look and make suggestions how to proceed with debugging?
> 
> Maciej


Definitely a bug in MySQL. They should be setting
CMAKE_REQUIRED_INCLUDES to ${OPENSSL_INCLUDE_DIR} before invoking the
CHECK_SYMBOL_EXISTS() function/macro in line 72 of cmake/ssl.cmake.
Otherwise CMake will not use the include directory found by
FindOpenSSL.cmake.

HTH

Michael
--

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] Problems finding the SSL library

2012-01-16 Thread Matchek
2011/12/22 Maciej (Matchek) Bliziński :
> CMake Error at cmake/ssl.cmake:83 (MESSAGE):
>  Cannot find appropriate system libraries for SSL.  Use WITH_SSL=bundled to
>  enable SSL support
> Call Stack (most recent call first):
>  CMakeLists.txt:255 (MYSQL_CHECK_SSL)

I found the MySQL-5.5 source code repository. Is CMakeLists.txt file
the main one? If so, here's the link:

http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/CMakeLists.txt

Another one that seems relevant, is this:

http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/cmake/ssl.cmake

Could anyone look and make suggestions how to proceed with debugging?

Maciej
--

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] Bug fix requests for the *next* release of CMake...

2012-01-16 Thread Abdelrazak Younes
http://public.kitware.com/Bug/view.php?id=12614

Even though this is not a bug fix... :-)

Thanks and regards,
Abdel.

-Original Message-
From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
David Cole
Sent: Monday, January 02, 2012 6:12 PM
To: cmake
Subject: [CMake] Bug fix requests for the *next* release of CMake...

Hi all,

Replies requested. Short replies only. Read on. Just a short reply
with bug numbers or links to the bugs is all we need here. Please move
specific discussions into the bugs themselves or start a new thread to
talk about it... Replies on this thread should just be a collector for
bug numbers.

Example one-line reply:

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

We are aiming for quarterly releases from now on, scheduling them
every 3 months. That would make the next release of CMake version
2.8.8, scheduled to have an "rc1" release candidate on Wed. March 7,
2012 -- just 9 weeks from this Wednesday.

If you have a particular issue that you think should be fixed for
inclusion in 2.8.8, please bring it up within the next two weeks.
Ideally, each issue will be discussed as needed on the mailing list to
come to any consensus about what should be done to fix it, and then an
entry in the bug tracker may be used to keep it on the radar screen,
and to track activity related to it. You can see what's on the roadmap
for this release here:
http://public.kitware.com/Bug/roadmap_page.php?version_id=90

Patches are always welcome. Patches that include testing of any new
features, or tests that prove a bug is really fixed on the dashboards,
basically any patch with testing is preferred over a patch with no
testing. Also, if you are *adding* code, then you also probably need
to add *tests* of that code, so that the coverage percentage stays as
is or rises.

Please discuss issues here as needed, and add notes to existing issues
in the bug tracker that you are interested in seeing fixed -- we will
be looking at the mailing list and activity in the bug tracker to help
prioritize the bug fixes that will occur in the near future.


Thanks,
David Cole
Kitware, Inc.


P.S. - as a nice summary of what we accomplished in the CMake 2.8.7
release, see here:
http://public.kitware.com/Bug/changelog_page.php?version_id=89
-- it currently lists 43 issues that we resolved: nice job, everybody!

(Many of those were specifically addressed because somebody brought it
up in response to my similar email from just after the last release...
Don't be shy!)
--

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] shared library with CMake in kdevelop4

2012-01-16 Thread Michael Hertling
On 01/16/2012 04:23 PM, paspa...@noos.fr wrote:
> Thank you michael
> 
> in fact at the beginning I wanted just to do a static local library
> 
> (I am totally new with cmake, before I didn't use that kind of tools with VS 
> and
> recently netbeans)
> 
> finally according to your suggestions I wrote:
> 
> projA
> project(proja)
> add_library(proja Execute_Msg.cpp)

If you definitely want a static library: ADD_LIBRARY(proja STATIC ...)
Without the explicit SHARED/STATIC keyword, the type of the resulting
library is determined by the BUILD_SHARED_LIBS variable which can be
controlled by the user; this might possibly be undesired.

> proj3
> cmake_minimum_required(VERSION 2.8)
> project(proj3)
> add_subdirectory(projA)
> add_executable(proj3 main.cpp)
> target_link_libraries(proj3 proja)
> 
> and it works
> thanks again
> pascal

Regards,

Michael

PS: Please don't drop the ML.

>  Message d'origine 
>  >De : "Michael Hertling" 
>  >À : cmake@cmake.org
>  >Objet : Re: [CMake] shared library with CMake in kdevelop4
>  >Date : 16/01/2012 15:39:29 CET
>  >
>  >On 01/16/2012 02:38 PM, paspa...@noos.fr wrote:
>  > >
>  > > I am new with kdevelop and cmake so apologize for this pretty naive
>  > question, I
>  > > create in kdevelop a proj3 project and want to link a library so I create
>  > a
>  > > second project projA within the proj3 directory
>  > >
>  > > the projA CMakelist is
>  > >
>  > > project(proja)
>  > > set( lib_SOURCES Execute_Msg.cpp )
>  > > add_library(proja ${lib_SOURCES} )
>  >
>  > If you want to get a shared library, you should state this explicitly:
>  >
>  > ADD_LIBRARY(proja SHARED ${lib_SOURCES} )
>  >
>  > Also see the BUILD_SHARED_LIBS variable.
>  >
>  > > the proj3 CMakelist is
>  > >
>  > > cmake_minimum_required(VERSION 2.8)
>  > > project(proj3)
>  > > link_directories(/pascal/pKD3/proj3/projA/build)
>  >
>  > Never use LINK_DIRECTORIES(), it's unnecessary and dangerous. Instead,
>  > you need ADD_SUBDIRECTORIES(projA) here to make projA known to proj3.
>  >
>  > > add_executable(proj3 main.cpp)
>  > > target_link_libraries(proj3 libproja)
>  >
>  > In TARGET_LINK_LIBRARIES(), refer to targets to link against
>  > by their *target names*, not by their *file names*, i.e.:
>  >
>  > TARGET_LINK_LIBRARIES(proj3 proja)
>  >
>  > > there is a libproja file in the /pascal/pKD3/proj3/projA/build directory,
>  > so I
>  > > don't understand why I get the message /usr/bin/ld: cannot find
>  > -llibproja
>  >
>  > This is because ld searches a quite restricted set of directories for
>  > libraries specifed by -l; particularly, it doesn't search the current
>  > directory. If you specify targets by their target names, CMake uses
>  > full paths in the linker command lines, so there will be no issue.
>  >
>  > > thanks for help
>  >
>  > Regards,
>  >
>  > Michael
--

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 add CMake includes and libraries to Visual Studio Solution?

2012-01-16 Thread hellhound
I use CMake to generate a Visual Studio 2010 project and solution file. 
Actually I could set different settings, like warning level, incremental 
building flag ect. from CMake. But I can't set additional includes and 
libraries, listed in the VC++ Directory configuration tab. 

For GCC projects anything is running fine and I could compile and link the 
project. For MSVC I've
to add those directories manually to perform a compile and link. But this is 
stupid and boring...

I tried to set the following CMake variables: 

   INCLUDE_DIRECTORIES
   LINK_DIRECTORIES
   CMAKE_INCLUDE_PATH

but nothing happend. If i open the project, the additional include directory of 
the solution is always empty (only standard MSVE settings are given). I tired 
to set this variables after executable creation, but this has also no effect.

I also tried to set the MSVC environment variables INCLUDE and PATH with 
SET(ENV${PATH} "c:\test\...\") but this also has no effect. The directories of 
the MSVC solution are empty.

This is what i do directly in the header of the cmake file:

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(${MODULE_NAME})
IF (MSVC)
   # Activate C++ exception handling
   IF (NOT CMAKE_CXX_FLAGS MATCHES "/EHsc")
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") 
   ENDIF ()

   # Set Warning level always to 4
   IF (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
 string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
   ELSE ()
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
   ENDIF ()

   #read path of dependency modules  
   file(READ "msvc.deps" MSVC_PROPERTIES)
   STRING(REGEX REPLACE ";" ";" MSVC_PROPERTIES "${MSVC_PROPERTIES}")
   STRING(REGEX REPLACE "\n" ";" MSVC_PROPERTIES "${MSVC_PROPERTIES}")

   FOREACH(e ${MSVC_PROPERTIES})
 SET(INCLUDE ${INCLUDE} ${e})
 MESSAGE(STATUS "[INFO]: Value ${e}")
   ENDFOREACH(e)
   INCLUDE_DIRECTORIES(${INCLUDE})
ENDIF ()

In the .deps file I've added to path of my dependeny modules, line separated:

c:\binrev\development\boost\1.47\includes
c:\binrev\repository\modules\brCore\trunk\includes

Both are read successfully but couldn't be set as additional include directory 
in my MSVC solution. 

Best regards, Hellhound




--

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] Creating the resource-only dll with NMake

2012-01-16 Thread Kozlovskiy, Alexey
Hi,

I tried to create a simple CMake project to assemble a resource only dll. My 
CMakeList.txt file:
cmake_minimum_required(VERSION 2.8)
set (PROJECT_NAME viewerResDLL)
project ( ${PROJECT_NAME} )
set ( SRCS_MAIN
   viewerres_en.rc
   )
set ( HDRS_MAIN
   resource.h
   )
add_library ( ${PROJECT_NAME} SHARED ${SRCS_MAIN} ${HDRS_MAIN} )
SET_TARGET_PROPERTIES (${PROJECT_NAME} PROPERTIES LINK_FLAGS "/MANIFEST:NO 
/NODEFAULTLIB /NOENTRY" )

I execute CMake with the following flags:
cmake -DCMAKE_BUILD_TYPE=Release -G"NMake Makefiles"

and receive the following error:
-- Configuring done
CMake Error: Error required internal CMake variable not set, cmake may be not 
be built correctly.
Missing variable is:
CMAKE_RC_CREATE_SHARED_LIBRARY
-- Generating done

"Nmake all" command finished without any errors, but in the same time without 
any results - viewerResDLL.dll not created.
If I use the "Visual Studio 9 2008 Win64" generator all looks working correct 
and I'm able to build viewerResDLL.dll

Any help will be very appreciated...
Thanks!

Regards,
Alexey

--

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] shared library with CMake in kdevelop4

2012-01-16 Thread Michael Hertling
On 01/16/2012 02:38 PM, paspa...@noos.fr wrote:
> 
> I am new with kdevelop and cmake so apologize for this pretty naive question, 
> I 
> create in kdevelop a proj3 project and want to link a library so I create a 
> second project projA within the proj3 directory
> 
> the projA CMakelist is
> 
> project(proja)
> set( lib_SOURCES Execute_Msg.cpp )
> add_library(proja ${lib_SOURCES} )

If you want to get a shared library, you should state this explicitly:

ADD_LIBRARY(proja SHARED ${lib_SOURCES} )

Also see the BUILD_SHARED_LIBS variable.

> the proj3 CMakelist is
> 
> cmake_minimum_required(VERSION 2.8)
> project(proj3)
> link_directories(/pascal/pKD3/proj3/projA/build)

Never use LINK_DIRECTORIES(), it's unnecessary and dangerous. Instead,
you need ADD_SUBDIRECTORIES(projA) here to make projA known to proj3.

> add_executable(proj3 main.cpp)
> target_link_libraries(proj3 libproja)

In TARGET_LINK_LIBRARIES(), refer to targets to link against
by their *target names*, not by their *file names*, i.e.:

TARGET_LINK_LIBRARIES(proj3 proja)

> there is a libproja file in the /pascal/pKD3/proj3/projA/build directory, so 
> I 
> don't understand why I get the message /usr/bin/ld: cannot find -llibproja

This is because ld searches a quite restricted set of directories for
libraries specifed by -l; particularly, it doesn't search the current
directory. If you specify targets by their target names, CMake uses
full paths in the linker command lines, so there will be no issue.

> thanks for help

Regards,

Michael
--

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] shared library with CMake in kdevelop4

2012-01-16 Thread David Cole
On Mon, Jan 16, 2012 at 9:34 AM, David Cole  wrote:
> On Mon, Jan 16, 2012 at 8:38 AM,   wrote:
>>
>> I am new with kdevelop and cmake so apologize for this pretty naive
>> question, I create in kdevelop a proj3 project and want to link a library so
>> I create a second project projA within the proj3 directory
>>
>> the projA CMakelist is
>>
>> project(proja)
>> set( lib_SOURCES Execute_Msg.cpp )
>> add_library(proja ${lib_SOURCES} )
>>
>> the proj3 CMakelist is
>>
>> cmake_minimum_required(VERSION 2.8)
>> project(proj3)
>> link_directories(/pascal/pKD3/proj3/projA/build)
>> add_executable(proj3 main.cpp)
>> target_link_libraries(proj3 libproja)
>>
>> there is a libproja file in the /pascal/pKD3/proj3/projA/build directory, so
>> I don't understand why I get the message /usr/bin/ld: cannot find -llibproja
>>
>> thanks for help
>>
>
> The second arg to target_link_libraries should be a CMake target name
> or the full path to a library file. In this case, it should be:
>
>  target_link_libraries(proj3 proja)
>
> since proja is a CMake target name. If it were a full path to a
> library file, it might be something like:
>
>  target_link_libraries(proj3 /path/to/libproja.a)
>
>
> HTH,
> David


And the call to link_directories is unnecessary. In either 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] shared library with CMake in kdevelop4

2012-01-16 Thread David Cole
On Mon, Jan 16, 2012 at 8:38 AM,   wrote:
>
> I am new with kdevelop and cmake so apologize for this pretty naive
> question, I create in kdevelop a proj3 project and want to link a library so
> I create a second project projA within the proj3 directory
>
> the projA CMakelist is
>
> project(proja)
> set( lib_SOURCES Execute_Msg.cpp )
> add_library(proja ${lib_SOURCES} )
>
> the proj3 CMakelist is
>
> cmake_minimum_required(VERSION 2.8)
> project(proj3)
> link_directories(/pascal/pKD3/proj3/projA/build)
> add_executable(proj3 main.cpp)
> target_link_libraries(proj3 libproja)
>
> there is a libproja file in the /pascal/pKD3/proj3/projA/build directory, so
> I don't understand why I get the message /usr/bin/ld: cannot find -llibproja
>
> thanks for help
>

The second arg to target_link_libraries should be a CMake target name
or the full path to a library file. In this case, it should be:

  target_link_libraries(proj3 proja)

since proja is a CMake target name. If it were a full path to a
library file, it might be something like:

  target_link_libraries(proj3 /path/to/libproja.a)


HTH,
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] shared library with CMake in kdevelop4

2012-01-16 Thread pasparis


I am new with kdevelop and cmake so apologize for this pretty naive question, I create in kdevelop a proj3 project and want to link a library so I create a second project projA within the proj3 directorythe projA CMakelist is project(proja)set( lib_SOURCES Execute_Msg.cpp )add_library(proja ${lib_SOURCES} )the proj3 CMakelist iscmake_minimum_required(VERSION 2.8)project(proj3)link_directories(/pascal/pKD3/proj3/projA/build)add_executable(proj3 main.cpp)target_link_libraries(proj3 libproja)there is a libproja file in the /pascal/pKD3/proj3/projA/build directory, so I don't understand why I get the message /usr/bin/ld: cannot find -llibprojathanks for help


--

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] does CMake have "usage targets" like Premake?

2012-01-16 Thread Yuri Timenkov
if i understand correctly it's CMake's find_package analog.

On Jan 16, 2012 10:41 AM, "Lance Luvaul"  wrote:

> See http://sourceforge.net/**tracker/index.php?func=detail&**
> aid=2794681&group_id=71616&**atid=531880for
>  more detail on what constitutes a usage-target.   How can I achieve the
> same result in CMake?  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
>
--

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] bug in FindOpeMP.cmake ?

2012-01-16 Thread Szilárd Páll
Additionally, the FindOpenMP.cmake implementation could see some improvements:

- It prints excessive amount of messages to the standard output, 30x2
lines before it fails, which is quite annoying and the module doesn't
fully respect the QUIET parameter.

- The error message can be confusing for users as it is refers to not
being able to find OpenMP, while in fact the issue is that the
respective compiler does not support it.

I'll go ahead and file a bug report for the previously mentioned flag
bug. Should I file the above request for improvement separately?

Cheers,
--
Szilárd



On Sat, Jan 14, 2012 at 6:18 PM, Szilárd Páll  wrote:
> Hi,
>
> It looks like there is a typo in FindOpenMP.cmake, on Windows the
> appropriate Intel Compiler flag is "/Qopenmp" not "-Qopenmp" (see
> http://goo.gl/NPbiJ).
>
> Before filing the bug could somebody test/confirm this -- I can't
> exclude the possibility that the compiler silently accepts "-Qopenmp",
> but I don't have a system to test it myself.
>
> Cheers,
> --
> Szilárd
--

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] Default compiler and linker flags with VS2010

2012-01-16 Thread Michael Stürmer
Hi there,

I want to automate a build of my software package. For that I use the "NMake 
Makefiles" generator and Visual Studio 2010. Even though I set all the 
necessary linker the way that my visual studio solution does not generate any 
error, I get warnings when I compile the NMake-way:

LINK: warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification

Now that is a very clear statement. INCREMENTAL is switched on and should be 
off. But in my CMAke scripts I set it to off:

SET( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /LTCG 
/INCREMENTAL:NO /DYNAMICBASE:NO /MACHINE:X86" )

Now when I serach for the corresponding makefile I find the following:

... /STACK:1000 /machine:X86  /LTCG /INCREMENTAL:NO /DYNAMICBASE:NO 
/MACHINE:X86  /debug /INCREMENTAL ...

I also found the following part in the Windows-cl.cmake within the 
Modules/Platform-folder in the CMake installation directory:

IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
  SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept 
${MSVC_INCREMENTAL_YES_FLAG}")
  SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /pdbtype:sept 
${MSVC_INCREMENTAL_YES_FLAG}")
ELSE (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
  SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug ${MSVC_INCREMENTAL_YES_FLAG}")
  SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug 
${MSVC_INCREMENTAL_YES_FLAG}")
ENDIF (CMAKE_COMPILER_SUPPORTS_PDBTYPE)
# for release and minsize release default to no incremental linking
SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT "/INCREMENTAL:NO")
SET(CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT "/INCREMENTAL:NO")

Why or how does CMake add the /INCREMENTAL-thing again if I switched it off 
before? How can I change the default behavior in a way that I get rid of the 
warnings? What is the exact order and how are the different variables like 
CMAKE_SHARED_LINKER_FLAGS_INIT CMAKE_SHARED_LINKER_FLAGS etc. combined? This 
really frustrates me at the moment.

Any help appreciated, ...


--

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] Unrecognized option '-rdynamic'

2012-01-16 Thread Jan Erik Knoblauch
Hi all.

I tried googling this warning I get when linking my executable, but
I couldn't find how to resolve this.
I have an existing gnu makefile based project in Linux that I recently have
converted to CMake (and very happy about it). I am now trying to resolve
the last issues and I would like to understand how to get rid of this
warning and the consequences.

I am crosscompiling for another target using the gcc compiler from
Codesourcery
(arm-none-eabi-gcc) and by default cmake has added the '-rdynamic' flag
while linking.
So I get the following message:
arm-none-eabi-gcc: unrecognized option '-rdynamic'

Any ideas?
Thanks in advance.

BR
Jan Erik Knoblauch
--

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] directshow change dll name to .ax - RESOLVED

2012-01-16 Thread gilles B

Thank you very much for your help Michael.

regards
Gilles.

> Message: 5
> Date: Thu, 12 Jan 2012 16:34:02 +0100
> From: Michael Wild 
> Subject: Re: [CMake] directshow change dll name to .ax
> To: cmake@cmake.org
> Message-ID: <4f0efd6a.5060...@gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> On 01/12/2012 04:26 PM, gilles B wrote:
> > Hi,
> > 
> > I want to create a directshow filter (windows) and so change output name
> > of my dll from "myfilter.dll" to "myfilter.ax"
> > How to do this ?
> > 
> > Thank you very much for your help
> > 
> > regards
> > Gilles.
> > 
> 
> set_target_properties(myfilter PROPERTIES
>   SUFFIX .ax)
> 
> 
> HTH
> 
> Michael

  --

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