Re: [CMake] Install libraries defined in INTERFACE targets

2018-06-11 Thread Robert Maynard
Here is an updated version of your example with working exporting of Module3 and importing inside Module4 ( I ignored the XML lib importing ) CMake_with_exporting.tar.xz Description: application/xz -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://

Re: [CMake] conditions and included subprojects

2018-06-11 Thread Andreas Naumann
I think, I missunderstood some parts. In particular, why should the user have to change the CMakeLists.txt? He/she can set the value at the commandline or in the cmake-gui and your CMakelist sees the value of your option and can react to that.  Gesendet: Montag, 11. Juni 2018 um 10:55 Uhr Von: "C

Re: [CMake] conditions and included subprojects

2018-06-11 Thread Johannes Zarl-Zierl
Hello Cornelis, I'm not sure if I get your use-case completely, but somtimes I also have the need for three-state variables. What I usually do: set(MY_OPTION "AUTO" CACHE STRING "Documentation for my option") set_property(CACHE MY_OPTION STRINGS "ON:OFF:AUTO") if("${MY_OPTION}" STREQUAL AUTO)

Re: [CMake] conditions and included subprojects

2018-06-11 Thread Cornelis Bockemühl
Thanks for your proposals! Actually my problem is basically that I want to keep up with some minimum good practice, but I am seeing myself throwing it over board constantly if I do not find a logical solution after one or two hours of struggling... Your second option is close to what I am currently

Re: [CMake] conditions and included subprojects

2018-06-11 Thread Andreas Naumann
Dear Cornelis,   your description looks to me like having a three valued option: ON, OFF, UNDEFINED. But an option in cmake language has only two values: ON or OFF.  To solve your problem with the connection between your sub-project and the main project, you should forget about the main project

[CMake] conditions and included subprojects

2018-06-11 Thread Cornelis Bockemühl
Dear CMake users, Maybe my question is trivial for most, but still I do not find an answer on my own! If you have a project and some sub-project (or module or whatever the jargon is) that are both managed with CMake, they should be in separate directories (directory trees), and each of them have

Re: [CMake] find_library doesn't find .dll on windows

2018-06-11 Thread Cyril Boucher
Hi Romain, Just to give you more insight on this and add details on top of Juan's answer, CMake will only able to find libraries with the .lib extension because it is what you are supposed to link against. And CMake explicitly defines that in the following file: https://gitlab.kitware.com/cmake/c