[CMake] include library dependencies in static lib for Visual Studio

2018-01-07 Thread Pedro Vicente
I have a project with a chain of external libraries and some of the 
dependencies depend on each other as options 

meaning 

project uses 

LIB A, 
LIB B

LIB B can use as option LIB C

my project then needs to inquire LIB B to see if LIB C was included (to link 
with LIB C)

I do this like this

message("-- Detecting if HDF5 library ${HDF5_LIBRARY} needs the ZLIB 
library...")
check_library_exists(${HDF5_LIBRARY} H5Z_DEFLATE "" NEED_ZLIB)

here LIB B = HDF5_LIBRARY
LIB C = the zlib library

this works with no problems in Linux.

However in Visual Studio , this detection only works if I manually set in the 
generated project
the option
"Link Library Dependencies"
to include LIB C (the zlib library)

these lines get added to the generated Visual Studio project


%(AdditionalOptions) /machine:x64
I:\nco\cmake\zlib\build\Debug\zlibstaticd.lib;I:\nco\cmake\szip\build\bin\Debug\libszip_D.lib
https://github.com/nco/nco/tree/master/cmake

on a windows Win64 developer shell

git clone https://github.com/nco/nco
cd cmake
clone.bat
bld.bat

this will git clone and build dependencies, but there will be linking errors 
because the ZLIB (and SZIP) libraries
were not correctly identified as needed

thanks


--
Pedro Vicente
http://www.space-research.org/
http://pedro-vicente.net/
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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


[Cmake-commits] CMake branch, master, updated. v3.10.1-710-g2c089d8

2018-01-07 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
   via  2c089d80de3945e4f08f13557d59e04cbc942a60 (commit)
  from  e0560cfc8afb90df08d20ec11e4178cf00be (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2c089d80de3945e4f08f13557d59e04cbc942a60
commit 2c089d80de3945e4f08f13557d59e04cbc942a60
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Mon Jan 8 00:01:04 2018 -0500
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Jan 8 00:01:04 2018 -0500

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index e5d5c34..fb6a47d 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 10)
-set(CMake_VERSION_PATCH 20180107)
+set(CMake_VERSION_PATCH 20180108)
 #set(CMake_VERSION_RC 1)

---

Summary of changes:
 Source/CMakeVersion.cmake |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits


Re: [CMake] CMake: using dlopen

2018-01-07 Thread Konstantin Tokarev


07.01.2018, 21:13, "Franck Houssen" :
> 
>> De: "Roger Leigh" 
>> À: "Franck Houssen" 
>> Cc: cmake@cmake.org
>> Envoyé: Dimanche 7 Janvier 2018 18:14:04
>> Objet: Re: [CMake] CMake: using dlopen
>>
>>  Original message 
>> From: Franck Houssen 
>> Date: 07/01/2018 13:58 (GMT+00:00)
>> To: Roger Leigh 
>> Cc: cmake@cmake.org
>> Subject: Re: [CMake] CMake: using dlopen
>>
>>> OK, thanks. So, I go with: target_link_libraries(main PUBLIC ... 
>>> ${CMAKE_DL_LIBS})
>>
>> Use PRIVATE if it is not used in any headers--it's an internal 
>> implementation detail.
>
> Difference between PUBLIC/PRIVATE has never been clear to me (usually I 
> always use PUBLIC).
> main.cpp includes dlfcn.h and uses it: not sure to get what you meant 
> (PRIVATE is for templates ? when a header include headers ?)

You should use target_link_libraries(A PUBLIC B) if and only if anything that 
links with library A must also link with library B (usually because B's types 
are used in public API of A). If A is not a library, there is no difference.

>
>> Regards,
>> Roger
>
> ,--
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake


-- 
Regards,
Konstantin
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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


Re: [CMake] CMake: using dlopen

2018-01-07 Thread Franck Houssen
- Mail original -

> De: "Roger Leigh" 
> À: "Franck Houssen" 
> Cc: cmake@cmake.org
> Envoyé: Dimanche 7 Janvier 2018 18:14:04
> Objet: Re: [CMake] CMake: using dlopen

>  Original message 
> From: Franck Houssen 
> Date: 07/01/2018 13:58 (GMT+00:00)
> To: Roger Leigh 
> Cc: cmake@cmake.org
> Subject: Re: [CMake] CMake: using dlopen

> > OK, thanks. So, I go with: target_link_libraries(main PUBLIC ...
> > ${CMAKE_DL_LIBS})

> Use PRIVATE if it is not used in any headers--it's an internal implementation
> detail.
Difference between PUBLIC/PRIVATE has never been clear to me (usually I always 
use PUBLIC). 
main.cpp includes dlfcn.h and uses it: not sure to get what you meant (PRIVATE 
is for templates ? when a header include headers ?) 

> Regards,
> Roger
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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


Re: [CMake] CMake: using dlopen

2018-01-07 Thread Franck Houssen


- Mail original -
> De: "Konstantin Tokarev" 
> À: "Franck Houssen" 
> Cc: cmake@cmake.org, "Roger Leigh" 
> Envoyé: Dimanche 7 Janvier 2018 17:50:40
> Objet: Re: [CMake] CMake: using dlopen
> 
> 
> 
> 07.01.2018, 19:36, "Franck Houssen" :
> > - Mail original -
> >>  De: "Konstantin Tokarev" 
> >>  À: "Franck Houssen" 
> >>  Cc: cmake@cmake.org, "Roger Leigh" 
> >>  Envoyé: Dimanche 7 Janvier 2018 15:20:08
> >>  Objet: Re: [CMake] CMake: using dlopen
> >>
> >>  > - Mail original -
> >>  >
> >>  >> De: "Roger Leigh" 
> >>  >> À: cmake@cmake.org
> >>  >> Envoyé: Samedi 6 Janvier 2018 18:42:11
> >>  >> Objet: Re: [CMake] CMake: using dlopen
> >>  >>
> >>  >> On 06/01/18 17:01, J Decker wrote:
> >>  >>> CMake/shared/modules will define the CMAKE_DL_LIBS which a very high
> >>  >>> percentage of the time will just be library 'dl' .
> >>  >
> >>  > OK. I didn't know that. But if so, why don't you see CMAKE_DL_LIBS when
> >>  > you
> >>  > run "cmake -LA ." and/or when you toggle adanced mode in ccmake ?
> >>  > What's
> >>  > the correct way to see all variables ?
> >>
> >>  Because cmake -L shows only cached variables, not all variables
> >
> > How to see all variables ?
> 
> See first part of https://stackoverflow.com/a/9328525
> 

OK, I see ! Thanks

> >
> >>  >
> >>  >>>
> >>  >>> Pretty much any man page on dlopen defines 'dl'
> >>  >>
> >>  >> On Linux. On MaxOSX and FreeBSD not at all, where the dl functions are
> >>  >> in libSystem and libc, respectively. Using CMAKE_DL_LIBS does the
> >>  >> right
> >>  >> thing on all platforms (though I wish it was an imported target to
> >>  >> make
> >>  >> exports a bit nicer).
> >>  >
> >>  > OK, thanks. So, I go with: target_link_libraries(main PUBLIC ...
> >>  > ${CMAKE_DL_LIBS})
> >>  >
> >>  >> Regards,
> >>  >> Roger
> >>  >> --
> >>  >>
> >>  >> Powered by www.kitware.com
> >>  >>
> >>  >> Please keep messages on-topic and check the CMake FAQ at:
> >>  >> http://www.cmake.org/Wiki/CMake_FAQ
> >>  >>
> >>  >> Kitware offers various services to support the CMake community. For
> >>  >> more
> >>  >> information on each offering, please visit:
> >>  >>
> >>  >> CMake Support: http://cmake.org/cmake/help/support.html
> >>  >> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> >>  >> CMake Training Courses: http://cmake.org/cmake/help/training.html
> >>  >>
> >>  >> Visit other Kitware open-source projects at
> >>  >> http://www.kitware.com/opensource/opensource.html
> >>  >>
> >>  >> Follow this link to subscribe/unsubscribe:
> >>  >> https://cmake.org/mailman/listinfo/cmake
> >>  >
> >>  > --
> >>  >
> >>  > Powered by www.kitware.com
> >>  >
> >>  > Please keep messages on-topic and check the CMake FAQ at:
> >>  > http://www.cmake.org/Wiki/CMake_FAQ
> >>  >
> >>  > Kitware offers various services to support the CMake community. For
> >>  > more
> >>  > information on each offering, please visit:
> >>  >
> >>  > CMake Support: http://cmake.org/cmake/help/support.html
> >>  > CMake Consulting: http://cmake.org/cmake/help/consulting.html
> >>  > CMake Training Courses: http://cmake.org/cmake/help/training.html
> >>  >
> >>  > Visit other Kitware open-source projects at
> >>  > http://www.kitware.com/opensource/opensource.html
> >>  >
> >>  > Follow this link to subscribe/unsubscribe:
> >>  > https://cmake.org/mailman/listinfo/cmake
> >>  --
> >>  Regards,
> >>  Konstantin
> 
> --
> Regards,
> Konstantin
> 
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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


Re: [CMake] CMake: using dlopen

2018-01-07 Thread Roger Leigh

 Original message From: Franck Houssen 
 Date: 07/01/2018  13:58  (GMT+00:00) To: Roger Leigh 
 Cc: cmake@cmake.org Subject: Re: [CMake] CMake: using 
dlopen 
> OK, thanks. So, I go with: target_link_libraries(main PUBLIC ... 
> ${CMAKE_DL_LIBS})

Use PRIVATE if it is not used in any headers--it's an internal implementation 
detail.
Regards,Roger-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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


Re: [CMake] CMake: using dlopen

2018-01-07 Thread Konstantin Tokarev


07.01.2018, 19:36, "Franck Houssen" :
> - Mail original -
>>  De: "Konstantin Tokarev" 
>>  À: "Franck Houssen" 
>>  Cc: cmake@cmake.org, "Roger Leigh" 
>>  Envoyé: Dimanche 7 Janvier 2018 15:20:08
>>  Objet: Re: [CMake] CMake: using dlopen
>>
>>  > - Mail original -
>>  >
>>  >> De: "Roger Leigh" 
>>  >> À: cmake@cmake.org
>>  >> Envoyé: Samedi 6 Janvier 2018 18:42:11
>>  >> Objet: Re: [CMake] CMake: using dlopen
>>  >>
>>  >> On 06/01/18 17:01, J Decker wrote:
>>  >>> CMake/shared/modules will define the CMAKE_DL_LIBS which a very high
>>  >>> percentage of the time will just be library 'dl' .
>>  >
>>  > OK. I didn't know that. But if so, why don't you see CMAKE_DL_LIBS when 
>> you
>>  > run "cmake -LA ." and/or when you toggle adanced mode in ccmake ? What's
>>  > the correct way to see all variables ?
>>
>>  Because cmake -L shows only cached variables, not all variables
>
> How to see all variables ?

See first part of https://stackoverflow.com/a/9328525

>
>>  >
>>  >>>
>>  >>> Pretty much any man page on dlopen defines 'dl'
>>  >>
>>  >> On Linux. On MaxOSX and FreeBSD not at all, where the dl functions are
>>  >> in libSystem and libc, respectively. Using CMAKE_DL_LIBS does the right
>>  >> thing on all platforms (though I wish it was an imported target to make
>>  >> exports a bit nicer).
>>  >
>>  > OK, thanks. So, I go with: target_link_libraries(main PUBLIC ...
>>  > ${CMAKE_DL_LIBS})
>>  >
>>  >> Regards,
>>  >> Roger
>>  >> --
>>  >>
>>  >> Powered by www.kitware.com
>>  >>
>>  >> Please keep messages on-topic and check the CMake FAQ at:
>>  >> http://www.cmake.org/Wiki/CMake_FAQ
>>  >>
>>  >> Kitware offers various services to support the CMake community. For more
>>  >> information on each offering, please visit:
>>  >>
>>  >> CMake Support: http://cmake.org/cmake/help/support.html
>>  >> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>>  >> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>  >>
>>  >> Visit other Kitware open-source projects at
>>  >> http://www.kitware.com/opensource/opensource.html
>>  >>
>>  >> Follow this link to subscribe/unsubscribe:
>>  >> https://cmake.org/mailman/listinfo/cmake
>>  >
>>  > --
>>  >
>>  > Powered by www.kitware.com
>>  >
>>  > Please keep messages on-topic and check the CMake FAQ at:
>>  > http://www.cmake.org/Wiki/CMake_FAQ
>>  >
>>  > Kitware offers various services to support the CMake community. For more
>>  > information on each offering, please visit:
>>  >
>>  > CMake Support: http://cmake.org/cmake/help/support.html
>>  > CMake Consulting: http://cmake.org/cmake/help/consulting.html
>>  > CMake Training Courses: http://cmake.org/cmake/help/training.html
>>  >
>>  > Visit other Kitware open-source projects at
>>  > http://www.kitware.com/opensource/opensource.html
>>  >
>>  > Follow this link to subscribe/unsubscribe:
>>  > https://cmake.org/mailman/listinfo/cmake
>>  --
>>  Regards,
>>  Konstantin

-- 
Regards,
Konstantin
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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


Re: [CMake] CMake: using dlopen

2018-01-07 Thread Franck Houssen


- Mail original -
> De: "Konstantin Tokarev" 
> À: "Franck Houssen" 
> Cc: cmake@cmake.org, "Roger Leigh" 
> Envoyé: Dimanche 7 Janvier 2018 15:20:08
> Objet: Re: [CMake] CMake: using dlopen
> 
> 
> 
> > - Mail original -
> > 
> >> De: "Roger Leigh" 
> >> À: cmake@cmake.org
> >> Envoyé: Samedi 6 Janvier 2018 18:42:11
> >> Objet: Re: [CMake] CMake: using dlopen
> >>
> >> On 06/01/18 17:01, J Decker wrote:
> >>> CMake/shared/modules will define the CMAKE_DL_LIBS which a very high
> >>> percentage of the time will just be library 'dl' .
> > 
> > OK. I didn't know that. But if so, why don't you see CMAKE_DL_LIBS when you
> > run "cmake -LA ." and/or when you toggle adanced mode in ccmake ? What's
> > the correct way to see all variables ?
> 
> Because cmake -L shows only cached variables, not all variables
> 

How to see all variables ?

> > 
> >>>
> >>> Pretty much any man page on dlopen defines 'dl'
> >>
> >> On Linux. On MaxOSX and FreeBSD not at all, where the dl functions are
> >> in libSystem and libc, respectively. Using CMAKE_DL_LIBS does the right
> >> thing on all platforms (though I wish it was an imported target to make
> >> exports a bit nicer).
> > 
> > OK, thanks. So, I go with: target_link_libraries(main PUBLIC ...
> > ${CMAKE_DL_LIBS})
> > 
> >> Regards,
> >> Roger
> >> --
> >>
> >> Powered by www.kitware.com
> >>
> >> Please keep messages on-topic and check the CMake FAQ at:
> >> http://www.cmake.org/Wiki/CMake_FAQ
> >>
> >> Kitware offers various services to support the CMake community. For more
> >> information on each offering, please visit:
> >>
> >> CMake Support: http://cmake.org/cmake/help/support.html
> >> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> >> CMake Training Courses: http://cmake.org/cmake/help/training.html
> >>
> >> Visit other Kitware open-source projects at
> >> http://www.kitware.com/opensource/opensource.html
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> https://cmake.org/mailman/listinfo/cmake
> > 
> > --
> > 
> > Powered by www.kitware.com
> > 
> > Please keep messages on-topic and check the CMake FAQ at:
> > http://www.cmake.org/Wiki/CMake_FAQ
> > 
> > Kitware offers various services to support the CMake community. For more
> > information on each offering, please visit:
> > 
> > CMake Support: http://cmake.org/cmake/help/support.html
> > CMake Consulting: http://cmake.org/cmake/help/consulting.html
> > CMake Training Courses: http://cmake.org/cmake/help/training.html
> > 
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> > 
> > Follow this link to subscribe/unsubscribe:
> > https://cmake.org/mailman/listinfo/cmake
> --
> Regards,
> Konstantin
> 
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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


Re: [CMake] CMake: using dlopen

2018-01-07 Thread Konstantin Tokarev


> - Mail original -
> 
>> De: "Roger Leigh" 
>> À: cmake@cmake.org
>> Envoyé: Samedi 6 Janvier 2018 18:42:11
>> Objet: Re: [CMake] CMake: using dlopen
>>
>> On 06/01/18 17:01, J Decker wrote:
>>> CMake/shared/modules will define the CMAKE_DL_LIBS which a very high
>>> percentage of the time will just be library 'dl' .
> 
> OK. I didn't know that. But if so, why don't you see CMAKE_DL_LIBS when you 
> run "cmake -LA ." and/or when you toggle adanced mode in ccmake ? What's the 
> correct way to see all variables ?

Because cmake -L shows only cached variables, not all variables

> 
>>>
>>> Pretty much any man page on dlopen defines 'dl'
>>
>> On Linux. On MaxOSX and FreeBSD not at all, where the dl functions are
>> in libSystem and libc, respectively. Using CMAKE_DL_LIBS does the right
>> thing on all platforms (though I wish it was an imported target to make
>> exports a bit nicer).
> 
> OK, thanks. So, I go with: target_link_libraries(main PUBLIC ... 
> ${CMAKE_DL_LIBS})
> 
>> Regards,
>> Roger
>> --
>>
>> Powered by www.kitware.com
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> https://cmake.org/mailman/listinfo/cmake
> 
> --
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more 
> information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
-- 
Regards,
Konstantin
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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


Re: [CMake] CMake: using dlopen

2018-01-07 Thread Franck Houssen
- Mail original -
> De: "Roger Leigh" 
> À: cmake@cmake.org
> Envoyé: Samedi 6 Janvier 2018 18:42:11
> Objet: Re: [CMake] CMake: using dlopen
> 
> On 06/01/18 17:01, J Decker wrote:
> > CMake/shared/modules will define the CMAKE_DL_LIBS  which a very high
> > percentage of the time will just be library 'dl' .

OK. I didn't know that. But if so, why don't you see CMAKE_DL_LIBS when you run 
"cmake -LA ." and/or when you toggle adanced mode in ccmake ? What's the 
correct way to see all variables ?

> > 
> > Pretty much any man page on dlopen defines 'dl'
> 
> On Linux.  On MaxOSX and FreeBSD not at all, where the dl functions are
> in libSystem and libc, respectively.  Using CMAKE_DL_LIBS does the right
> thing on all platforms (though I wish it was an imported target to make
> exports a bit nicer).

OK, thanks. So, I go with: target_link_libraries(main PUBLIC ... 
${CMAKE_DL_LIBS})

> 
> 
> Regards,
> Roger
> --
> 
> Powered by www.kitware.com
> 
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
> 
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
> 
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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