Re: [CMake] find_package to find Cygwin versions of Flex and Bison

2020-03-05 Thread Stephen Morris
Thank you; prepending C:/cygwin64/bin To CMAKE_PROGRAM_PATH was all I needed to do to fix the problem. -Original Message- Date: Thu, 5 Mar 2020 14:28:27 +0100 From: Eric Doenges You can prepend C:\cygwin64\bin to the CMAKE_PROGRAM_PATH variable so that it looks there first.? While the

Re: [CMake] find_package to find Cygwin versions of Flex and Bison in Windows

2020-03-05 Thread Eric Doenges
You can prepend C:\cygwin64\bin to the CMAKE_PROGRAM_PATH variable so that it looks there first.  While the find_package documentation does not mention CMAKE_PROGRAM_PATH, I know this works for bison and flex because that is what we do in our project (presumably, find_program is used internally

[CMake] find_package to find Cygwin versions of Flex and Bison in Windows

2020-03-05 Thread Stephen Morris
To compile my application I need to use the Flex and Bison applications. To compile under Linux, all I need to do in my CMakeLists.txt file to find them is find_package(FLEX REQUIRED) find_package(BISON REQUIRED) ...and everything works as expected. In Windows, however, I'm using the Cy

Re: [CMake] find_package config and install

2019-01-22 Thread Lars
name indicates. Any comments are welcome 😊 kind regards, Lars Fra: Alan W. Irwin Sendt: onsdag 23. januar 2019 04.14 Til: Lars Kopi: cmake@cmake.org Emne: Re: Sv: [CMake] find_package config and install Hi Lars: On 2019-01-22 12:05- Lars wrote: > Alan,

Re: [CMake] find_package config and install

2019-01-22 Thread Alan W. Irwin
Hi Lars: On 2019-01-22 12:05- Lars wrote: Alan, Thank you very much for the response. You are welcome. Our 'foo' package does not use CMake. That means there is no build-system to produce the foo-config.cmake file, the file is manually created. The file does allow different project

Re: [CMake] find_package config and install

2019-01-22 Thread Lars
kind regards, Lars Fra: Alan W. Irwin Sendt: tirsdag 22. januar 2019 09.29 Til: Lars Kopi: cmake@cmake.org Emne: Re: [CMake] find_package config and install On 2019-01-21 11:09- Lars wrote: > Hello, > > We are creating a foo-config.cmake file for a package. The 'foo' pa

Re: [CMake] find_package config and install

2019-01-22 Thread Alan W. Irwin
On 2019-01-21 11:09- Lars wrote: Hello, We are creating a foo-config.cmake file for a package. The 'foo' package contain a dynamic library that provides two interfaces and a number of configuration files. There is a mapping between an interface and required configuration files. What is th

[CMake] find_package config and install

2019-01-21 Thread Lars
Hello, We are creating a foo-config.cmake file for a package. The 'foo' package contain a dynamic library that provides two interfaces and a number of configuration files. There is a mapping between an interface and required configuration files. What is the recommended approach for installing t

Re: [CMake] find_package Config vs Module mode

2018-10-20 Thread Johannes Zarl-Zierl
Hi Joachim, Am Samstag, 20. Oktober 2018, 13:22:04 CEST schrieb Joachim Wuttke: > If Config mode is the newer, preferred way to find a package, I would expect > find_package to first try Config mode, and only fall back to Module mode if > no config scripts can be found. However, according to the f

[CMake] find_package Config vs Module mode

2018-10-20 Thread Joachim Wuttke
Somewhere we are advised that Module mode should be phased out in favor of Config mode. If Config mode is the newer, preferred way to find a package, I would expect find_package to first try Config mode, and only fall back to Module mode if no config scripts can be found. However, according to t

Re: [CMake] find_package Module/Config mode and nontrivial package version checks

2018-10-05 Thread Joachim Wuttke
Module mode is only selected if there is a Find.cmake file available. Otherwise Config mode is used anyway. For a given project's call only one of the modes can be used: the find module is either present or it is not. If the find module is available it is used and becomes responsible for enforc

Re: [CMake] find_package Module/Config mode and nontrivial package version checks

2018-10-05 Thread Brad King
On 10/04/2018 02:36 PM, Joachim Wuttke wrote: > What then about user code that ought to check > for version compatibility? Module mode only offers a check > for an EXACT version string, and does not terminate if > that condition is not met [3]. Module mode is only selected if there is a Find.cmake

[CMake] find_package Module/Config mode and nontrivial package version checks

2018-10-04 Thread Joachim Wuttke
The find_package command docs [1,2] recommend that user code should generally look for packages using the Module mode signature. What then about user code that ought to check for version compatibility? Module mode only offers a check for an EXACT version string, and does not terminate if that cond

Re: [CMake] find_package with COMPONENTS never honors REQUIRED

2018-08-30 Thread Eric Noulard
Le jeu. 30 août 2018 à 20:03, George PF a écrit : > > The documentation is intriguing about REQUIRED COMPONENTS interaction > > That's... one way to put it. > Yeah you know. Kind of ironic here :-) > > So it is possible that the failure behavior when specifying COMPONENTS > is up to the mo

Re: [CMake] find_package with COMPONENTS never honors REQUIRED

2018-08-30 Thread George PF
> The documentation is intriguing about REQUIRED COMPONENTS interaction That's... one way to put it. > "A package-specific list of required components may be listed after the > ``COMPONENTS`` option (or after the ``REQUIRED`` option if present). > Additional optional components may be listed

Re: [CMake] find_package with COMPONENTS never honors REQUIRED

2018-08-30 Thread Eric Noulard
Le jeu. 30 août 2018 à 18:01, George PF a écrit : > Hi, > > once COMPONENTS is added to a find_package statement, any REQUIRED > statement ceases to have an effect: > > cmake_minimum_required(VERSION 3.12) > > # find_package(FailsCorrectly REQUIRED) > > find_package(Qt REQUIRED COMPON

[CMake] find_package with COMPONENTS never honors REQUIRED

2018-08-30 Thread George PF
Hi, once COMPONENTS is added to a find_package statement, any REQUIRED statement ceases to have an effect: cmake_minimum_required(VERSION 3.12) # find_package(FailsCorrectly REQUIRED) find_package(Qt REQUIRED COMPONENTS REQUIRED Qt5XYZ REQUIRED) find_package(Qt REQUIRED COM

Re: [CMake] find_package: keyword REQUIRED ignored

2018-07-09 Thread Rolf Eike Beer
Am Montag, 9. Juli 2018, 09:45:25 CEST schrieb Mark De Wit: > I thought that the find script itself was responsible for checking the > required flag? That's what find_package_handle_standard_args() does. Eike signature.asc Description: This is a digitally signed message part. -- Powered by www

Re: [CMake] find_package: keyword REQUIRED ignored

2018-07-09 Thread Mark De Wit
d by these variables; see the find module for details. In Config mode find_package handles REQUIRED, QUIET, and [version] options automatically Mark From: CMake On Behalf Of Quaquaraquà Sent: 08 July 2018 22:35 To: Cmake Mailing List Subject: [CMake] find_package: keyword REQUIRED ignored Hi

Re: [CMake] find_package: keyword REQUIRED ignored

2018-07-09 Thread Rolf Eike Beer
Am 2018-07-08 23:34, schrieb Quaquaraquà: Hi there, I'm using a custom script [1] to look for the library sqlite3. However, the keyword "REQUIRED" (as quietly) is ignored by find_package. That is even if the library is not found, the script continues is processing: // CMakeLists.txt cmake_mini

[CMake] find_package: keyword REQUIRED ignored

2018-07-08 Thread Quaquaraquà
Hi there, I'm using a custom script [1] to look for the library sqlite3. However, the keyword "REQUIRED" (as quietly) is ignored by find_package. That is even if the library is not found, the script continues is processing: // CMakeLists.txt cmake_minimum_required(VERSION 3.10)project(hello_

Re: [CMake] find_package and get_target_property

2018-04-13 Thread CHEVRIER, Marc
; Subject: Re: [CMake] find_package and get_target_property Ah I see. In this case, the Libraries I'm depending on are generated, built and installed using CMake. I'm hoping that CMake is able to generate the Find.cmake for me with the appropriate imported targets, as long as INSTALL

Re: [CMake] find_package and get_target_property

2018-04-13 Thread Saad Khattak
> on…). The documentation of the package, if any, generally describe how to > use the package. > > > > > > *From: *CMake on behalf of Saad Khattak < > saadrus...@gmail.com> > *Date: *Friday 13 April 2018 at 05:29 > *To: *Cmake Mailing List > *Subject: *[

Re: [CMake] find_package and get_target_property

2018-04-13 Thread CHEVRIER, Marc
. From: CMake on behalf of Saad Khattak Date: Friday 13 April 2018 at 05:29 To: Cmake Mailing List Subject: [CMake] find_package and get_target_property Hi, I am successfully able to find a package using find_package(LibA) but I cannot do a get_target_property on the package as I get the error

[CMake] find_package and get_target_property

2018-04-12 Thread Saad Khattak
Hi, I am successfully able to find a package using find_package(LibA) but I cannot do a get_target_property on the package as I get the error: get_target_property() called with non-existent target "LibA" How do I go about the target properties for a package? - Saad -- Powered by www.kitware.c

Re: [CMake] find_package not finding Threads

2018-04-07 Thread Andrew Brownsword
I updated to CMake 3.11.0, but still got the same error. I have gotten around the problem by removing the find_package and forcing -pthread on the C/C++ command line, however this is an unsatisfying resolution to the problem. > On Mar 30, 2018, at 12:06 PM, Andrew Brownsword > wrote: > > I h

[CMake] find_package not finding Threads

2018-03-30 Thread Andrew Brownsword
I have an Ubuntu 16.04 ARMv7 system upon which I have built CLang 7.0 and am now trying to use it to build my CMake-based project that was previously working with the CLang 3.8.0 that I had installed via apt-get. The new compiler does appear to be selected correctly when I run cmake. The run f

Re: [CMake] find_package() for static only / shared only

2018-03-23 Thread Mario Emmenlauer
Two thumbs up for this! :-) On 23.03.2018 03:14, Ray Donnelly wrote: > Our why doesn't cmake set a long needed standard here of .dll.lib and be done > with this nonsense? > > On Thu, Mar 22, 2018, 11:58 PM P F via CMake > wrote: > > Why not install shared librarie

Re: [CMake] find_package() for static only / shared only

2018-03-23 Thread Mario Emmenlauer
Dear PF, thanks! I think this is a quite sensible approach and I will do as you suggest. I did not consider it at first because there are some packages that can install static and shared side-by-side. But I agree that your suggestion is ore pragmatic and also less error-prone. All the best,

Re: [CMake] find_package() for static only / shared only

2018-03-22 Thread Ray Donnelly
Our why doesn't cmake set a long needed standard here of .dll.lib and be done with this nonsense? On Thu, Mar 22, 2018, 11:58 PM P F via CMake wrote: > Why not install shared libraries in one location and static libraries in > another? > > > On Mar 21, 2018, at 4:55 AM, Mario Emmenlauer > wrote

Re: [CMake] find_package() for static only / shared only

2018-03-22 Thread P F via CMake
Why not install shared libraries in one location and static libraries in another? > On Mar 21, 2018, at 4:55 AM, Mario Emmenlauer wrote: > > > I've googled this issue for a while now but found only few > references (1,2) and no solution. I'd like to enforce that > find_package() will only acce

Re: [CMake] find_package() for static only / shared only

2018-03-22 Thread CHEVRIER, Marc
Yes. Seems OK. For Windows, if libraries are all your owns, you can manage this by relaying on a specific prefix for static libraries. A commonly adopted naming is to add prefix "lib" for static libraries. Now, if you add to rely on external libraries, I don't see any general solution. On 22/03

Re: [CMake] find_package() for static only / shared only

2018-03-22 Thread Mario Emmenlauer
Dear Marc, this is a pretty neat idea! Let me quickly recapitulate: the library prefixes and suffixes for multiple platforms are: | static| shared | prefix|suffix| prefix| suffix

Re: [CMake] find_package() for static only / shared only

2018-03-22 Thread CHEVRIER, Marc
Another possibility is to customize the variable CMAKE_FIND_LIBRARY_SUFFIXES. For example, on linux: * shared only: set (CMAKE_FIND_LIBRARY_SUFFIXES ".so") * static only: set (CMAKE_FIND_LIBRARY_SUFFIXES ".a") On Windows, it is more problematic because static and "import" shared libraries have sa

[CMake] find_package() for static only / shared only

2018-03-21 Thread Mario Emmenlauer
I've googled this issue for a while now but found only few references (1,2) and no solution. I'd like to enforce that find_package() will only accept static or shared libraries. I would then set this option based on BUILD_SHARED_LIBS=(ON|OFF). I.e. I'd love to have something like: if(BUILD_SH

[CMake] find_package(): fails because static library is not installed

2018-02-15 Thread Kim Walisch
Hi, I have added support for find_package(primesieve) to my primesieve library and I have exported 2 targets in my main CMakeLists.txt: primesieve::libprimesieve (shared library) primesieve::libprimesieve-static It works fine if both the static and shared primesieve libraries have previously bee

Re: [CMake] find_package( ITK ) with ITK version 4.8 and cmake 3.9.0-rc6 (3.1+ anyway) is like finding Dory

2017-08-09 Thread Luis Caro Campos
Hi Brian, What is the version passed to cmake_minimum_required for your project? (Typically the first line in your top-level CMakeLists.txt). I suspect if you set it to a version higher than 3.1 the warnings will disappear (I believe it is set to a version older than that, hence the policy warnin

[CMake] find_package( ITK ) with ITK version 4.8 and cmake 3.9.0-rc6 (3.1+ anyway) is like finding Dory

2017-08-09 Thread Brian Davis
I am so lost in CMB0054 errors I and internet searches I can't remember why I wanted Itk-4.8 in the first place. Here goes: When using CMake 3.9.0-rc6 or basically 3.1+ (onward) and trying: find_package( ITK ) with 4.8 built / installed and receiving: CMake Warning (dev) at install/lib

Re: [CMake] find_package(Threads) leads to CMake Error: TRY_RUN() invoked in cross-compiling mode

2017-08-03 Thread Steffen Dettmer
a small correction: On Thu, Aug 3, 2017 at 5:59 PM, Steffen Dettmer wrote: > Building C object CMakeFiles/cmTC_47cd8.dir/CheckForPthreads.c.o > /opt/xyzcross/x86-linux2/bin/powerpc-linux-gnu-gcc --sysroot=... >-o CMakeFiles/cmTC_47cd8.dir/CheckForPthreads.c.o -c > /usr/local/share/cmake

[CMake] find_package(Threads) leads to CMake Error: TRY_RUN() invoked in cross-compiling mode

2017-08-03 Thread Steffen Dettmer
Hi, I tried to fix linux (p)thread usage on a proprietary, somewhat complex (300-400 cmake files, ca 30.000 lines) cmake project. We have CMAKE_TOOLCHAIN_FILEs for the cross compiling platforms. These set(CMAKE_SYSTEM_NAME Linux), CMAKE_C_FLAGS(-D_REENTRANT... CACHE STRING "" FORCE)) and so on

Re: [CMake] find_package(), FindXXX.cmake and IMPORTED add_library()

2017-07-03 Thread Louis-Paul CORDIER
(My answers to your previous email are below this new question.) I have another question thus: some libraries, especially on Windows, provide both static and shared library. Is there any way for selecting which kind of library we want to get? For instance: LibJPEGTurbo has (turbojpeg.lib + tu

Re: [CMake] find_package(), FindXXX.cmake and IMPORTED add_library()

2017-07-01 Thread P F via CMake
> On Jun 30, 2017, at 6:40 AM, Louis-Paul CORDIER > wrote: > > Hi, > > I'm particularly familiar with find_package() command, add_library(... > IMPORTED) and find_library(). However, I found there are many differences on > find_package() usage depending of the library being imported. > > Fo

[CMake] find_package(), FindXXX.cmake and IMPORTED add_library()

2017-06-30 Thread Louis-Paul CORDIER
Hi, I'm particularly familiar with find_package() command, add_library(... IMPORTED) and find_library(). However, I found there are many differences on find_package() usage depending of the library being imported. For instance, using find_package() on Qt5 will retrieve a bunch of *Config.cma

[CMake] find_package() locating 32bit libs incorrectly

2017-06-11 Thread Paul Smith
executable trying to link a 32bit library). I'm using a slightly older CMake (3.5.2) but I'd assume find_package() understands the standard directory structure used by Red Hat. Is there a way to convince CMake find_package() to look in the right directory? -- Powered by www.kitware.com

[CMake] find_package: request/proposal for better version matching support

2016-04-12 Thread Nicholas Braden
I've run into a bit of an issue with the find_package interface. Let's say I want to use a library libsemver: find_package(semver REQUIRED) Now, I want my code to work even when libsemver releases new versions with breaking API changes, and I happen to know they follow the semantic versioning sys

Re: [CMake] find_package REQUIRED ignores OPTIONAL_COMPONENTS

2016-03-22 Thread Jakob van Bethlehem
Hm, interesting. I wonder then if Qt-devs are maintaining this, or the CMake-devs? If the same bug is still present in Qt5, it should be fixed. Sincerely, Jakob On Sun, Mar 20, 2016 at 8:37 PM, Alexander Stein < alexander.stein+cm...@mailbox.org> wrote: > On Tuesday 08 March 2016, 10:00:00 wrote

Re: [CMake] find_package REQUIRED ignores OPTIONAL_COMPONENTS

2016-03-20 Thread Alexander Stein
On Tuesday 08 March 2016, 10:00:00 wrote Nicholas Braden: > Jakob, I don't think there is any confusion about what REQUIRED means. > Whether or not REQUIRED is provided, the list of OPTIONAL_COMPONENTS > should not be required under any circumstances. The example error > message seems pretty clear

Re: [CMake] find_package REQUIRED ignores OPTIONAL_COMPONENTS

2016-03-08 Thread Nicholas Braden
Jakob, I don't think there is any confusion about what REQUIRED means. Whether or not REQUIRED is provided, the list of OPTIONAL_COMPONENTS should not be required under any circumstances. The example error message seems pretty clear to me that the expected behavior and actual behavior are different

Re: [CMake] find_package REQUIRED ignores OPTIONAL_COMPONENTS

2016-03-08 Thread Jakob van Bethlehem
Hej Alexander, Yes, you're missing a subtle detail. You assume that the 'REQUIRED' keyword reflects the fact that COMPONENTS are required. This is not the case. The REQUIRED keyword reflects that the entire package Qt4 is required, see https://cmake.org/cmake/help/v3.0/command/find_package.html wh

[CMake] find_package REQUIRED ignores OPTIONAL_COMPONENTS

2016-03-04 Thread Alexander Stein
Hi, I want to use some required Qt component while others are optional. Apparently if you specify REQUIRED in find_package OPTIONAL_COMPONENTS is ignored. Here is a minimal CMakeLists.txt: project(test) cmake_minimum_required(VERSION 3.5) find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui OPTIONA

Re: [CMake] find_package for both debug and release with Visual Studio

2015-09-25 Thread Tamás Kenéz
1. build your own project, too, in separate build trees for debug and release 2. if all your dependencies' are prepared to provide debug and release libs simultanously (like Poco) you can build them in separate trees (however not neccessary) but set CMAKE_INSTALL_PREFIX and CMAKE_PREFIX_PATH to the

Re: [CMake] find_package for both debug and release with Visual Studio

2015-09-25 Thread Dan Kegel
"John Barbero Unenge" wrote: > > I'm tearing my hair out about how to include thrid party libraries in my cmake project. Currently I build Poco and a bunch of others that all generate their respective Config.cmake which I use with find_package. I have a wrapping build script that builds all of my

[CMake] find_package for both debug and release with Visual Studio

2015-09-25 Thread John Barbero Unenge
I'm tearing my hair out about how to include thrid party libraries in my cmake project. Currently I build Poco and a bunch of others that all generate their respective Config.cmake which I use with find_package. I have a wrapping build script that builds all of my dependencies and package them sepa

Re: [CMake] find_package and lib/cmake/Foo

2015-07-22 Thread Biddiscombe, John A.
Robert > Have you tried setting CMAKE_PREFIX_PATH < That seems to work. I will use it from now on. Thanks JB -- 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 co

Re: [CMake] find_package and lib/cmake/Foo

2015-07-21 Thread Robert Maynard
is? > > > > thanks > > > > JB > > > > > > From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Biddiscombe, John > A. > Sent: 21 July 2015 14:54 > To: cmake@cmake.org > Subject: [CMake] find_package and lib/cmake/Foo > > > > I’ve asked th

Re: [CMake] find_package and lib/cmake/Foo

2015-07-21 Thread Biddiscombe, John A.
JB From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Biddiscombe, John A. Sent: 21 July 2015 14:54 To: cmake@cmake.org Subject: [CMake] find_package and lib/cmake/Foo I've asked this before, but never resolved it... if I stall package Foo into CMAKE_INSTALL_PREFIX=/my/path/prefi

[CMake] find_package and lib/cmake/Foo

2015-07-21 Thread Biddiscombe, John A.
I've asked this before, but never resolved it... if I stall package Foo into CMAKE_INSTALL_PREFIX=/my/path/prefix and generate /my/path/prefix/lib/cmake/Foo/FooConfig.cmake etc then with Foo_DIR=/my/path/prefix Foo_ROOT=/my/path/prefix find_package(Foo) does not find package Foo One needs to set

Re: [CMake] find_package

2015-05-04 Thread matzeNOTAVAILABLE .
Hi, unset(Boost_INCLUDE_DIR CACHE) does not work either. I have also tried to unset the following: unset(Boost_INCLUDE_DIR CACHE) unset(Boost_INCLUDE_DIR) unset(Boost_INCLUDE_DIRS CACHE) unset(Boost_INCLUDE_DIRS) unset(Boost_FOUND CACHE) unset(Boost_FOUND) unset(Boost_LIBRARIES CACHE) unset(Bo

Re: [CMake] find_package

2015-04-27 Thread Nagger
Hi, After this fails, if i delete CMakeCache.txt and rerun the script, it works. In fact it seems to be related to the line: Boost_INCLUDE_DIR:PATH=/usr/include which is in CMakeCache.txt. Than just delete that cache variable (before the second call of find_package): unset(Boost_INCLUDE_DIR

Re: [CMake] find_package

2015-04-27 Thread matzeNOTAVAILABLE .
Hi, thanks for the replies. I am still facing the same issue. For those interested, here is how to reproduce the issue: - mkdir test; cd test - mkdir build; mkdir src; mkdir external - wget -O external/boost_1_57_0.tar.bz2 http://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.tar.

Re: [CMake] find_package

2015-04-24 Thread Chuck Atkins
Hi Matt, 1) (... set boost_root ...) > 2) FIND_PACKAGE(Boost 1.57 COMPONENTS log thread filesystem system) > If you're using CMake >= 3.0, then there's a Boost_NAMESPACE variable you can set that will cause the find module look for mangled library names line myboostnamespace_datetime instead of b

Re: [CMake] find_package

2015-04-24 Thread David Cole via CMake
You should keep replies on the mailing list so others can see it, and pitch in and help. If you are actually building boost using execute_process during a CMake run, then it should be able to find it with your find_package call. Perhaps you need to give the find_package in step 4 a hint to find it

Re: [CMake] find_package

2015-04-24 Thread David Cole via CMake
How do you do step 3) -- build boost? Unless the build is done and installed and ready to find before the end of step 3, there is still nothing (yet) there for the find_package in step 4 to find... David C. On Fri, Apr 24, 2015 at 9:36 AM, matzeNOTAVAILABLE . wrote: > Hi, > i am struggling so

[CMake] find_package

2015-04-24 Thread matzeNOTAVAILABLE .
Hi, i am struggling somewhat with find_package. I looked at the documentation and googled quite a bit, but i am still stuck. I alos tried stackoverflow to no avail. What i am trying to accomplish is the following: 1) See if my custom boost installation exists (using find_package) (version 1.57) 2)

Re: [CMake] FIND_PACKAGE () : self location ?

2014-11-10 Thread Nils Gladitz
On 11/10/2014 06:32 AM, Nicholas Yue wrote: I am improving an in-house Find*.cmake and need to determine (programmatically) where it (the Find*.cmake file) is located because I need to run a companion python script. Is there some variable I can query ? CMAKE_CURRENT_LIST_DIR for the full pat

[CMake] FIND_PACKAGE () : self location ?

2014-11-09 Thread Nicholas Yue
Hi, I am improving an in-house Find*.cmake and need to determine (programmatically) where it (the Find*.cmake file) is located because I need to run a companion python script. Is there some variable I can query ? If not, I will find a different way but the above seems more intuitive and less

[CMake] find_package issues with ITK and VTK (and SlicerExecution Model)

2014-09-30 Thread Williams, Norman K
This is a problem that has been cropping up in our projects that use ITK, VTK and SlicerExecutionModel. You won’t see it UNLESS you turn on the ITKVTK/ITKVtkGlue modules. The problem is this: if you find packages in this order: find_package(VTK REQUIRED) find_package(ITK REQUIRED) You can’t re

Re: [CMake] find_package and lib/cmake.

2014-09-21 Thread Nils Gladitz
On 21.09.2014 23:34, Biddiscombe, John A. wrote: If a projX is installed to ~/apps/projX And when installed it creates projXConfig.cmake projXConfigVersion.cmake projXTargets-debug.cmake projXTargets.cmake &etc. In ~/apps/projX/lib/cmake/projX It is necessary to say cmake –Dprojx_DIR=~/apps/

[CMake] find_package and lib/cmake.

2014-09-21 Thread Biddiscombe, John A.
If a projX is installed to ~/apps/projX And when installed it creates projXConfig.cmake projXConfigVersion.cmake projXTargets-debug.cmake projXTargets.cmake &etc. In ~/apps/projX/lib/cmake/projX It is necessary to say cmake –Dprojx_DIR=~/apps/projX/lib/cmake/projX ….. When configuring another

Re: [CMake] find_package and INTERFACE targets in 3.0

2014-07-21 Thread Walter Gray
Hendrick! That's exactly what I'm trying to do. Do you have an example of the declaration of the dll import target setup you could share? That would be immensely helpful. Thanks Walter On 7/19/2014 4:01 AM, Hendrik Sattler wrote: Hi, for DLLs, the .lib part has it's own property IMPORTED_I

Re: [CMake] find_package and INTERFACE targets in 3.0

2014-07-19 Thread Hendrik Sattler
Hi, for DLLs, the .lib part has it's own property IMPORTED_IMPLIB. This is already the case for older versions of CMake but at least the Qt4 find module makes no use of it. In our own project, we use global imported targets with dll and import lib set (and other properties like includes) and u

Re: [CMake] find_package and INTERFACE targets in 3.0

2014-07-18 Thread Walter Gray
Thanks Nils! The examples in the git repo are particularly helpful. It seems that in all of the examples, the library type is being set to UNKNOWN. Is there a reason for this? It seems that STATIC would be more suitable for most of those, though the wording in the docs for IMPORTED_LOCATION [

Re: [CMake] find_package and INTERFACE targets in 3.0

2014-07-18 Thread Nils Gladitz
On 07/18/2014 05:00 AM, Walter Gray wrote: Hi list! I'm a big fan of the new INTERFACE targets & target usage requirements, but none of the provided Find.cmake files seem to take advantage of the new paradigm. Checking the wiki, the old Find.cmake seem to be deprecated, with most of the informa

[CMake] find_package and INTERFACE targets in 3.0

2014-07-17 Thread Walter Gray
Hi list! I'm a big fan of the new INTERFACE targets & target usage requirements, but none of the provided Find.cmake files seem to take advantage of the new paradigm. Checking the wiki, the old Find.cmake seem to be deprecated, with most of the information on authoring new packages assuming

[CMake] find_package() vs ExternalProject_Add()

2014-05-08 Thread Zaak Beekman
Am I correct in stating that ExternalProject_Add() cannot completely replace find_package()? e.g. if I point ExternalProject_Add() to download a software package (which uses a CMake build system and exports its targets and provides a -config.cmake file) the only thing this does is to provide a tar

[CMake] find_package config mode question

2014-04-18 Thread Mclendon, William C III
Hi, I'm trying to set up a project pulls in information from another CMake project (include dirs, libraries, etc.). As I understand it the right thing to do is create a config.cmake.in in the source project and then use find_package in config mode to pull in the information to the dependent pr

Re: [CMake] find_package with static library that uses pkg-config not working

2014-03-31 Thread Aurelien Richez
you should have hamlib_STATIC_FOUND, hamlib_STATIC_LDFLAGS and hamlib_STATIC_LIBRARIES set. Regards Aurélien - Mail original - > De: "Bill Somerville" > À: "Aurelien Richez" > Cc: cmake@cmake.org > Envoyé: Lundi 31 Mars 2014 18:25:02 > Objet:

Re: [CMake] find_package with static library that uses pkg-config not working

2014-03-31 Thread Bill Somerville
ements. I assume it needs to get both dynamic and static linking requirements as I believe at the time it runs the decision as to which type of link is required has not been made. Hope this helps. Aurélien Regards Bill Somerville. - Mail original - De: "Bill Somerville" À

Re: [CMake] find_package with static library that uses pkg-config not working

2014-03-31 Thread Aurelien Richez
Envoyé: Dimanche 30 Mars 2014 12:45:32 > Objet: [CMake] find_package with static library that uses pkg-config not > working > > Hi, > > I am using find_package to configure a library that uses pkg-config. > When I configure and build a static only version of the li

[CMake] find_package with static library that uses pkg-config not working

2014-03-30 Thread Bill Somerville
Hi, I am using find_package to configure a library that uses pkg-config. When I configure and build a static only version of the library the link commands generated for my project are wrong. The problem boils down to the fact that for static link of a library pkg-config needs to be called wi

Re: [CMake] "find_package(MPI)" overriding "set(MPIEXEC)" in CmakeList.txt

2014-01-12 Thread Yngve Inntjore Levinsen
nsen [yngve.levin...@gmail.com] > Sent: Friday, January 10, 2014 5:33 AM > To: Pettey . Lucas; cmake@cmake.org > Subject: Re: [CMake] "find_package(MPI)" overriding "set(MPIEXEC)" in > CmakeList.txt > > Hi, > > Did Den 09. jan. 2014 22:49, skrev Pette

Re: [CMake] "find_package(MPI)" overriding "set(MPIEXEC)" in CmakeList.txt

2014-01-10 Thread Pettey . Lucas
ore Levinsen [yngve.levin...@gmail.com] Sent: Friday, January 10, 2014 5:33 AM To: Pettey . Lucas; cmake@cmake.org Subject: Re: [CMake] "find_package(MPI)" overriding "set(MPIEXEC)" in CmakeList.txt Hi, Did Den 09. jan. 2014 22:49, skrev Pettey . Lucas: > Hello, > > On a

Re: [CMake] "find_package(MPI)" overriding "set(MPIEXEC)" in CmakeList.txt

2014-01-10 Thread Yngve Inntjore Levinsen
Hi, Did Den 09. jan. 2014 22:49, skrev Pettey . Lucas: > Hello, > > On a Cray XE6, I am using find_package(MPI REQUIRED) in my CMakeLists.txt. It > correctly finds all of the MPI stuff, except that it sets the MPIEXEC to the > login node mpiexec command. I would like to override this behavior an

[CMake] "find_package(MPI)" overriding "set(MPIEXEC)" in CmakeList.txt

2014-01-09 Thread Pettey . Lucas
Hello, On a Cray XE6, I am using find_package(MPI REQUIRED) in my CMakeLists.txt. It correctly finds all of the MPI stuff, except that it sets the MPIEXEC to the login node mpiexec command. I would like to override this behavior and set the MPIEXEC command to the "aprun" wrapper, but it is not

[CMake] find_package failing with Ninja

2013-12-04 Thread Michael Sartain
I'm hitting this is on 64-bit Linux (Ubuntu 12.04). Simple CMakeLists.txt file: cmake_minimum_required(VERSION 2.8) project(Blah) find_package(OpenGL REQUIRED) message("OPENGL_INCLUDE_DIRS is ${OPENGL_INCLUDE_DIRS}") message("OPENGL_LIBRARIES is ${OPENGL_LIBRARIES}") Doing a regular "cm

Re: [CMake] find_package(mpi) language specification

2013-09-05 Thread Andrew Corrigan
Thank you. QUIET is definitely an improvement, and I can live with that. However, it would still be nice to be able to reduce clutter and remove MPI_CXX_* and MPI_LIBRARY, MPI_EXTRA_LIBRARY from the CMake cache, to avoid overwhelming or confusing users. On Sep 5, 2013, at 1:29 PM, Nick Overdi

Re: [CMake] find_package(mpi) language specification

2013-09-05 Thread Nick Overdijk
You can pass the QUIET parameter to find_package... that'll at least shut it up. Perhaps easiest in your case. On 2013-05-09, at 18:22:25 , Andrew Corrigan wrote: > Hello, > > My C++ code only uses the MPI C library. > > 1. Is there a way to tell find_package(MPI) to only look for the C versi

[CMake] find_package(mpi) language specification

2013-09-05 Thread Andrew Corrigan
Hello, My C++ code only uses the MPI C library. 1. Is there a way to tell find_package(MPI) to only look for the C version? 2. If not, can FindMPI.cmake be changed to support this (just like with Boost you can specify only the components you need) 3. If not, can that warning message "Could NOT

Re: [CMake] find_package

2013-09-05 Thread Nils Gladitz
Yes, from the Documentation: The "general" keyword corresponds to all configurations, and is purely optional (assumed if omitted). I think the primary reason for having separate libraries on Windows but not Redhat is that Visual Studio provides separate runtimes for Debug and Release

[CMake] find_package

2013-09-05 Thread Lars Lars
Using Latest version of CMake on Windows 7 and Redhat 6 Running the below code on both platforms produce slightly different content in QT_LIBRARIES. FIND_PACKAGE(Qt4 4.7.1 COMPONENTS QtCore QtGui) IF (QT4_FOUND) MESSAGE(STATUS "QT_LIBRARIES: ${QT_LIBRARIES}" ENDIF() On Windows I get; "Op

Re: [CMake] find_package and install

2013-08-29 Thread Craig Scott
Have a look for install_qt4_executable. We've been using that instead of having to explicitly install the Qt libraries ourselves. Much easier to maintain and it seems to deal well with all the platform differences. PS: I'm going from memory so I might have the name of that function slightly wro

[CMake] find_package and install

2013-08-29 Thread Lars Lars
Hello, I have the following configuration; FIND_PACKAGE(Qt4 4.7.1 COMPONENTS QtCore) IF (Qt4_FOUND) INCLUDE(${QT_USE_FILE}) MESSAGE(STATUS "QT_LIBRARIES:${QT_LIBRARIES}") ENDIF() # setup header and source files ADD_EXECUTABLE(TBD ${_SOURCES} ${_HEADERS}) TARGET_LINK_LIBRARI

Re: [CMake] find_package components required or not

2013-08-21 Thread Alexander Neundorf
On Thursday 15 August 2013, Lars Lars wrote: > Hello, > > The find_package macro provides the keywords "REQUIRED" and "COMPONENTS". > > > > The docs state: "The REQUIRED option stops processing with an error message > if the package cannot be found. A package-specific list of components may > b

[CMake] find_package components required or not

2013-08-15 Thread Lars Lars
Hello, The find_package macro provides the keywords "REQUIRED" and "COMPONENTS". The docs state: "The REQUIRED option stops processing with an error message if the package cannot be found. A package-specific list of components may be listed after the REQUIRED option or after the COMPONENTS

Re: [CMake] find_package() Config mode iteration gravely broken (Mac OpenCV KISS installation fails)

2013-04-30 Thread Alexander Neundorf
On Tuesday 30 April 2013, Andreas Mohr wrote: > On Tue, Apr 30, 2013 at 09:44:35PM +0200, Alexander Neundorf wrote: > > On Tuesday 30 April 2013, Andreas Mohr wrote: > > > Consider /opt/local/lib/cmake/OpenCVConfig-version.cmake > > > Visit /opt/local/lib/cmake/OpenCVConfig-version.cmake/ > > > Che

Re: [CMake] find_package() Config mode iteration gravely broken (Mac OpenCV KISS installation fails)

2013-04-30 Thread Andreas Mohr
On Tue, Apr 30, 2013 at 09:44:35PM +0200, Alexander Neundorf wrote: > On Tuesday 30 April 2013, Andreas Mohr wrote: > > Consider /opt/local/lib/cmake/OpenCVConfig-version.cmake > > Visit /opt/local/lib/cmake/OpenCVConfig-version.cmake/ > > CheckDirectory (dir /opt/local/lib/cmake/OpenCVConfig-versi

Re: [CMake] find_package() Config mode iteration gravely broken (Mac OpenCV KISS installation fails)

2013-04-30 Thread Alexander Neundorf
On Tuesday 30 April 2013, Andreas Mohr wrote: > Hi, > > tried to grab OpenCV on Mac OS 10.6 (via standard macports install), > expected it to be a walk in the park. > Imagine my surprise when this failed persistently and stubbornly. > > Turns out internet is full of reports of OpenCV Config failu

[CMake] find_package() Config mode iteration gravely broken (Mac OpenCV KISS installation fails)

2013-04-30 Thread Andreas Mohr
Hi, tried to grab OpenCV on Mac OS 10.6 (via standard macports install), expected it to be a walk in the park. Imagine my surprise when this failed persistently and stubbornly. Turns out internet is full of reports of OpenCV Config failure (and, I have to say, the sufficiently condescending tone

[CMake] find_package( Boost ${BOOST_MIN_VERSION} REQUIRED is ignored....

2013-03-01 Thread Witold E Wolski
The story actually starts with an compile error: undefined reference to `boost::filesystem3::path::stem() const' which I do not understand. I am developing on ubuntu 12.04 with boost 1.46 and 1.48 installed. AFAIK filesystem V3 is the default since boost 1.45. My cmakelists.txt file contain

Re: [CMake] find_package(xyz)

2012-11-05 Thread Marshall, Rob
Neundorf [mailto:a.neundorf-w...@gmx.net] Sent: Monday, November 05, 2012 9:26 AM To: cmake@cmake.org Cc: Marshall, Rob Subject: Re: [CMake] find_package(xyz) On Monday 05 November 2012, Marshall, Rob wrote: > Is the intent of the find_package() macro to be used to locate > prebuilt third

  1   2   3   >