Re: [CMake] MSVC7.1 static link question

2009-02-12 Thread Philip Lowman
On Wed, Feb 11, 2009 at 8:54 AM, Brad King brad.k...@kitware.com wrote:

 Philip Lowman wrote:

 On Tue, Feb 10, 2009 at 1:01 PM, Brad King brad.k...@kitware.com
  CMake 2.6 makes it easy to export targets from one project (either its
build tree or install tree) for use by another project.

 Is this the easiest way to register dependencies of IMPORTED static
 libraries against each other?  I'm just curious if there are plans to make
 target_link_libraries() work for this or is there a technical problem
 allowing it?


 I do not plan to allow target_link_libraries for this.  One must use
 IMPORTED_LINK_INTERFACE_LIBRARIES.  However, it is easier than your
 example makes it because the property can name other imported targets:

 add_library(baz STATIC IMPORTED)
 set_target_properties(baz PROPERTIES
IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/libbaz.a
IMPORTED_LOCATION_DEBUG   ${CMAKE_CURRENT_SOURCE_DIR}/libbazd.a)

 add_library(bar STATIC IMPORTED)
 set_target_properties(bar PROPERTIES
IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/libbar.a
IMPORTED_LOCATION_DEBUG   ${CMAKE_CURRENT_SOURCE_DIR}/libbard.a
IMPORTED_LINK_INTERFACE_LIBRARIES baz) # -- dependency is here


Yes, thanks for pointing that out, that is much simpler.

Note if the outside project is also created by CMake, the install(EXPORT)
 feature can generate the proper import code for it.


Yes, I hope to play with that feature soon.  Thanks.

-- 
Philip Lowman
___
Powered by www.kitware.com

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

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

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

Re: [CMake] MSVC7.1 static link question

2009-02-12 Thread Micha Renner
 I do not plan to allow target_link_libraries for this.  One must use
 IMPORTED_LINK_INTERFACE_LIBRARIES.  However, it is easier than your
 example makes it because the property can name other imported targets:
 
 add_library(baz STATIC IMPORTED)
 set_target_properties(baz PROPERTIES
  IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/libbaz.a
  IMPORTED_LOCATION_DEBUG   ${CMAKE_CURRENT_SOURCE_DIR}/libbazd.a)
 
 add_library(bar STATIC IMPORTED)
 set_target_properties(bar PROPERTIES
  IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/libbar.a
  IMPORTED_LOCATION_DEBUG   ${CMAKE_CURRENT_SOURCE_DIR}/libbard.a
  IMPORTED_LINK_INTERFACE_LIBRARIES baz) # -- dependency is here
 
 Note if the outside project is also created by CMake, the install(EXPORT)
 feature can generate the proper import code for it.
 
 -Brad

So, the dependency of libraries is now clear, even for me.

But what about the dependency library - program.
In the following example, I think, there is something missing.

FIND_PACKAGE(LOCAL_TIFF REQUIRED)

ADD_LIBRARY(_tiff SHARED IMPORTED)
SET_PROPERTY(TARGET _tiff PROPERTY IMPORTED_LOCATION ${TIFF_LIBRARY})
INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR})

# Source files
SET(_src ascii_tag.c)
ADD_EXECUTABLE(ascii_tag ${_src})
TARGET_LINK_LIBRARIES(ascii_tag _tiff)

- 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] Cmake macro and date

2009-02-12 Thread Benoit
Hy,

I want to retrieve today date in order to install various release each day.
I've created a script: GetDataTime.cmake

In which I have defined this macro:

INCLUDE(FindPerl)
MACRO (TODAY RESULT)
IF (PERL_FOUND)
EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -E
'($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
printf \%02d%02d%02d\,$year-100,$mon+1,$mday;' OUTPUT_VARIABLE ${RESULT})
MESSAGE( STATUS (in) ${RESULT})
ELSE (PERL_FOUND)
  MESSAGE(SEND_ERROR Perl needed to obtain today date)
ENDIF(PERL_FOUND)
ENDMACRO (TODAY)

Then in the CMakeList.txt I have call
INCLUDE(GetTime)
TODAY(VAR)
MESSAGE( STATUS TODAY is ${VAR})


When i call the makefile I have:
-- (in) VAR
-- Correctly setted


Someone can tell me how to use a macro to retrieve a result because I'm not
sure to understand


--
Benoit RAT
www.neub.co.nr
___
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] Setting macro while compiling through cmake

2009-02-12 Thread ankit jain
Hi all,

If i want to compile through g++ as:

g++ -Dname=value

The same if i want to do with cmake how to do it. Whether i need to make
some entry in CMakeCache.txt or somewhere else?

Ankit
___
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] Setting macro while compiling through cmake

2009-02-12 Thread Sergey Rudchenko

ankit jain wrote:

Hi all,
 
If i want to compile through g++ as:
 
g++ -Dname=value
 
The same if i want to do with cmake how to do it. Whether i need to 
make some entry in CMakeCache.txt or somewhere else?
 
Ankit


See ADD_DEFINITIONS in the CMake manual.

--
Best regards,
Sergey Rudchenko
___
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] Setting macro while compiling through cmake

2009-02-12 Thread Mike Jackson

Add_definition(-Dname=value) in your cmakelists.txt file

Mike Jackson


Sent from my iPod

On Feb 12, 2009, at 8:01, ankit jain ankitgu...@gmail.com wrote:


Hi all,

If i want to compile through g++ as:

g++ -Dname=value

The same if i want to do with cmake how to do it. Whether i need to  
make some entry in CMakeCache.txt or somewhere else?


Ankit
___
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] Cmake macro and date

2009-02-12 Thread Eric Noulard
2009/2/12 Benoit benpaka.s...@gmail.com:
 Hy,

 I want to retrieve today date in order to install various release each day.
 I've created a script: GetDataTime.cmake

 In which I have defined this macro:

 INCLUDE(FindPerl)
 MACRO (TODAY RESULT)
 IF (PERL_FOUND)
 EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -E
 '($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
 printf \%02d%02d%02d\,$year-100,$mon+1,$mday;' OUTPUT_VARIABLE ${RESULT})

[...]

 Someone can tell me how to use a macro to retrieve a result because I'm not
 sure to understand

I think your example should work since this one is working fine:

MACRO (TODAY RESULT)
EXECUTE_PROCESS(COMMAND echo MacroSetted OUTPUT_VARIABLE ${RESULT})
MESSAGE( STATUS (in) ${RESULT})
ENDMACRO (TODAY)

TODAY(FF)
MESSAGE(STATUS FF = ${FF})

I think perl execution is behaving strangely when executed from within
execute_process.
I would bet that when executed interactively in a termibnal it works as expected
but does not behave the same way regarding standard output when launch in exec.

-- 
Erk
___
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] Fwd: Cmake macro and date

2009-02-12 Thread Eric Noulard
Fwd to the list


-- Forwarded message --
From: Benoit RAT (Gmail) benoit@gmail.com
Date: 2009/2/12
Subject: Re: [CMake] Cmake macro and date
To: Eric Noulard eric.noul...@gmail.com


Okay it seems to be perl problem therefore I've decided to make the
script directly calling system function:

Here you have an exemple using REGEXP extension:

MACRO (TODAY RESULT)
IF (WIN32)
EXECUTE_PROCESS(COMMAND date /T OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE (..)/(..)/..(..).* \\3\\2\\1
${RESULT} ${${RESULT}})
ELSEIF(UNIX)
EXECUTE_PROCESS(COMMAND date +%d/%m/%Y OUTPUT_VARIABLE ${RESULT})
string(REGEX REPLACE (..)/(..)/..(..).* \\3\\2\\1
${RESULT} ${${RESULT}})
ELSE (WIN32)
MESSAGE(SEND_ERROR date not implemented)
SET(${RESULT} 00)
ENDIF (WIN32)
ENDMACRO (TODAY)

Hope it can be usefull to someone!

--
Benoit RAT
www.neub.co.nr


On Thu, Feb 12, 2009 at 2:59 PM, Eric Noulard eric.noul...@gmail.com wrote:

 2009/2/12 Benoit benpaka.s...@gmail.com:
  Hy,
 
  I want to retrieve today date in order to install various release each day.
  I've created a script: GetDataTime.cmake
 
  In which I have defined this macro:
 
  INCLUDE(FindPerl)
  MACRO (TODAY RESULT)
  IF (PERL_FOUND)
  EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -E
  '($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
  printf \%02d%02d%02d\,$year-100,$mon+1,$mday;' OUTPUT_VARIABLE ${RESULT})

 [...]

  Someone can tell me how to use a macro to retrieve a result because I'm not
  sure to understand

 I think your example should work since this one is working fine:

 MACRO (TODAY RESULT)
EXECUTE_PROCESS(COMMAND echo MacroSetted OUTPUT_VARIABLE ${RESULT})
MESSAGE( STATUS (in) ${RESULT})
 ENDMACRO (TODAY)

 TODAY(FF)
 MESSAGE(STATUS FF = ${FF})

 I think perl execution is behaving strangely when executed from within
 execute_process.
 I would bet that when executed interactively in a termibnal it works as 
 expected
 but does not behave the same way regarding standard output when launch in 
 exec.

 --
 Erk




-- 
Erk
___
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] MSVC7.1 static link question

2009-02-12 Thread Luigi Calori

Philip Lowman ha scritto:
On Wed, Feb 11, 2009 at 8:54 AM, Brad King brad.k...@kitware.com 
mailto:brad.k...@kitware.com wrote:


Philip Lowman wrote:

On Tue, Feb 10, 2009 at 1:01 PM, Brad King
brad.k...@kitware.com mailto:brad.k...@kitware.comCMake
2.6 makes it easy to export targets from one project (either its

   build tree or install tree) for use by another project.

Is this the easiest way to register dependencies of IMPORTED
static libraries against each other?  I'm just curious if
there are plans to make target_link_libraries() work for this
or is there a technical problem allowing it?


I do not plan to allow target_link_libraries for this.  One must use
IMPORTED_LINK_INTERFACE_LIBRARIES.  However, it is easier than your
example makes it because the property can name other imported
targets:


add_library(baz STATIC IMPORTED)
set_target_properties(baz PROPERTIES
   IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/libbaz.a
   IMPORTED_LOCATION_DEBUG   ${CMAKE_CURRENT_SOURCE_DIR}/libbazd.a)

add_library(bar STATIC IMPORTED)
set_target_properties(bar PROPERTIES
   IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/libbar.a
   IMPORTED_LOCATION_DEBUG   ${CMAKE_CURRENT_SOURCE_DIR}/libbard.a
   IMPORTED_LINK_INTERFACE_LIBRARIES baz) # -- dependency is here

I' ma bit confused, just to make clear: the proposed import method  are 
used in the  final projects that USES the libraries.
by install(EXPORT) the needed code is hidden in a config--baz--cmake 
file that is evaluated inby the final project tha so does not have to 
rely on FindBAZ script.
But effectively this is just a way to hide the fact that  the final 
project  links to both libbaz and libbar


The specification of dependency lib as a STATIC_LIBRARY_FLAGS produce a 
bigger library tha has both baz and bar, and can be used straight, at 
least under VS7.1


I appreciate the IMPORT and EXPORT stuff and will try to use that (could 
we use that also for the whole OpenSceneGraph itself ? what do you think 
Philip?)

Nevertheless the STATIC_LIBRARY_FLAGS seems much simpler

Thanks


Yes, thanks for pointing that out, that is much simpler.

Note if the outside project is also created by CMake, the
install(EXPORT)
feature can generate the proper import code for it.

 
Yes, I hope to play with that feature soon.  Thanks.


--
Philip Lowman



___
Powered by www.kitware.com

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

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

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


Re: [CMake] MSVC7.1 static link question

2009-02-12 Thread Bill Hoffman

Luigi Calori wrote:

I' ma bit confused, just to make clear: the proposed import method  are 
used in the  final projects that USES the libraries.
by install(EXPORT) the needed code is hidden in a config--baz--cmake 
file that is evaluated inby the final project tha so does not have to 
rely on FindBAZ script.
But effectively this is just a way to hide the fact that  the final 
project  links to both libbaz and libbar


The specification of dependency lib as a STATIC_LIBRARY_FLAGS produce a 
bigger library tha has both baz and bar, and can be used straight, at 
least under VS7.1


I appreciate the IMPORT and EXPORT stuff and will try to use that (could 
we use that also for the whole OpenSceneGraph itself ? what do you think 
Philip?)

Nevertheless the STATIC_LIBRARY_FLAGS seems much simpler


But not as portable.  The IMPORT/EXPORT will work cross platform and 
with many different compilers.


-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


Re: [CMake] Setting macro while compiling through cmake

2009-02-12 Thread Alexander Neundorf
On Thursday 12 February 2009, ankit jain wrote:
 Hi all,

 If i want to compile through g++ as:

 g++ -Dname=value

 The same if i want to do with cmake how to do it. Whether i need to make
 some entry in CMakeCache.txt or somewhere else?

This is a lot of documentation available online, which gives you this kind of 
basic information:
http://www.cmake.org/Wiki/CMake#Tutorials
You can also buy the book Mastering CMake:
http://www.kitware.com/products/books/CMakeBook.html

Best regards
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] MSVC7.1 static link question

2009-02-12 Thread Luigi Calori

Bill Hoffman ha scritto:

Luigi Calori wrote:

I' ma bit confused, just to make clear: the proposed import method  
are used in the  final projects that USES the libraries.
by install(EXPORT) the needed code is hidden in a config--baz--cmake 
file that is evaluated inby the final project tha so does not have to 
rely on FindBAZ script.
But effectively this is just a way to hide the fact that  the final 
project  links to both libbaz and libbar


The specification of dependency lib as a STATIC_LIBRARY_FLAGS produce 
a bigger library tha has both baz and bar, and can be used straight, 
at least under VS7.1


I appreciate the IMPORT and EXPORT stuff and will try to use that 
(could we use that also for the whole OpenSceneGraph itself ? what do 
you think Philip?)

Nevertheless the STATIC_LIBRARY_FLAGS seems much simpler


But not as portable.  The IMPORT/EXPORT will work cross platform and 
with many different compilers.


-Bill


Ok, understood, thanks a lot to everyone: I' ll try to look at 
IMPORT/EXPORT.

Are there project examples available:
It would really be nice to have CMake projects for libraries.
I' m trying to build cmake projects for jpeg,tiff and png libs, as I' m 
working in VS7.1 and not finding projects for this platform.
Are any plans for providing CMake based source packages? People that are 
working on kde on windows how do they build their deps?

Thanks again
Luigi
___
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] MSVC7.1 static link question

2009-02-12 Thread Bill Hoffman

Luigi Calori wrote:

Ok, understood, thanks a lot to everyone: I' ll try to look at 
IMPORT/EXPORT.

Are there project examples available:
It would really be nice to have CMake projects for libraries.
I' m trying to build cmake projects for jpeg,tiff and png libs, as I' m 
working in VS7.1 and not finding projects for this platform.
Are any plans for providing CMake based source packages? People that are 
working on kde on windows how do they build their deps?

Thanks again


VTK has png/tiff/jpeg that have been cmakeified:

http://public.kitware.com/cgi-bin/viewcvs.cgi/Utilities/
___
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] Separate the compiler used for compile versus link

2009-02-12 Thread Bill O'Hara
Right now I have a legacy makefile which does the equivalent of

gcc -c foo.c
g++ -o foo foo.o -lasdf -lqwer

Because asdf and qwer are static libraries from c++ sources.

Is there a straightforward way to do something like

add_executable(foo foo.c)
target_link_libraries(foo asdf qwer)

in this case and have g++ used for final compilation step?

thanks
b.
___
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] Separate the compiler used for compile versus link

2009-02-12 Thread Clinton Stimpson
On Thursday 12 February 2009 11:47:09 Bill O'Hara wrote:
 Right now I have a legacy makefile which does the equivalent of

 gcc -c foo.c
 g++ -o foo foo.o -lasdf -lqwer

 Because asdf and qwer are static libraries from c++ sources.

 Is there a straightforward way to do something like

 add_executable(foo foo.c)
 target_link_libraries(foo asdf qwer)

 in this case and have g++ used for final compilation step?

 thanks
 b.

Try this:
set_target_properties(foo PROPERTIES LINKER_LANGAUGE CXX)

Clint

___
Powered by www.kitware.com

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

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

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


Re: [CMake] MSVC7.1 static link question

2009-02-12 Thread Philip Lowman
On Thu, Feb 12, 2009 at 11:43 AM, Luigi Calori l.cal...@cineca.it wrote:

 Philip Lowman ha scritto:

add_library(baz STATIC IMPORTED)
set_target_properties(baz PROPERTIES
   IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/libbaz.a
   IMPORTED_LOCATION_DEBUG   ${CMAKE_CURRENT_SOURCE_DIR}/libbazd.a)

add_library(bar STATIC IMPORTED)
set_target_properties(bar PROPERTIES
   IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/libbar.a
   IMPORTED_LOCATION_DEBUG   ${CMAKE_CURRENT_SOURCE_DIR}/libbard.a
   IMPORTED_LINK_INTERFACE_LIBRARIES baz) # -- dependency is here

  I' ma bit confused, just to make clear: the proposed import method  are
 used in the  final projects that USES the libraries.
 by install(EXPORT) the needed code is hidden in a config--baz--cmake file
 that is evaluated inby the final project tha so does not have to rely on
 FindBAZ script.
 But effectively this is just a way to hide the fact that  the final project
  links to both libbaz and libbar

 The specification of dependency lib as a STATIC_LIBRARY_FLAGS produce a
 bigger library tha has both baz and bar, and can be used straight, at least
 under VS7.1

 I appreciate the IMPORT and EXPORT stuff and will try to use that (could we
 use that also for the whole OpenSceneGraph itself ? what do you think
 Philip?)
 Nevertheless the STATIC_LIBRARY_FLAGS seems much simpler


Not to take things too off-topic, but I actually like the idea of building
libjpeg, libtiff, libpng, and even libfreetype within the OSG itself just
like VTK does, but building them only on Windows platforms (especially since
Kitware has already CMakeified them).  If Robert has concerns about
tarball size these could always be located in a separate tarball for
releases that Windows users would have to download separately.  For Linux,
though, I think it would be a mistake to build these libraries since 99% of
distributions have them anyways and they are well maintained with bugfixes
and security patches.

This would get you what you want on WIN32 anyways which is being able to use
the libraries statically while at the same time it would reduce the burden
on maintaining the 3rdPartyDeps solution for OSG for every possible way of
compiling with Visual Studio 7.1, 8.0, or 9.0 (and by the way, would you
like /MT or /MD with that?).

In regards to your question though,

IMPORT/EXPORT looks very interesting for CMake projects, but I really
haven't used it in this context yet or for importing external dependencies
(other than bar and baz) to have an opinion on the matter.  :)   I think
Bill has some good points about portability.  I didn't completely understand
what you needed STATIC_LIBRARY_FLAGS for.  In fact part of me still doesn't
as I've never needed to clump static libraries together for convenience in
any of the projects I work on.

-- 
Philip Lowman
___
Powered by www.kitware.com

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

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

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

Re: [CMake] Can FindBoost.cmake support STLport

2009-02-12 Thread Philip Lowman
On Wed, Feb 11, 2009 at 8:34 PM, unixcc uni...@gmail.com wrote:

 Today, I compiled two Boost libraries with following command:

 bjam --with-thread --with-date_time stdlib=stlport --build-type=complete
 stage

 So, I got following libraries

 boost_date_time-vc80-mt-gdp-1_38.dll

...

 libboost_thread-vc80-mt-sp.lib


Thanks for attaching the libraries.

I've opened a bug for this issue because unfortunately fixing it will be
non-trivial and necessitate cleaning up the mess below without introducing
any regressions.  I think this is something that can be fixed post 2.6.3.
Please create a bug tracker account and Monitor the following issue as
testing would obviously be appreciated once a patch is made available.

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

Also we should be able to add options for nonstandard IOstreams and
python debug at the same time.

FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
NAMES
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
   ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
   ${Boost_LIB_PREFIX}boost_${COMPONENT}
HINTS  ${_boost_LIBRARIES_SEARCH_DIRS}
)

FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
NAMES
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}
   ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG}
HINTS  ${_boost_LIBRARIES_SEARCH_DIRS}
)


-- 
Philip Lowman
___
Powered by www.kitware.com

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

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

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