[CMake] Writing find packages

2015-09-03 Thread Robert Dailey
How recent is this documentation? http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries#Writing_find_modules It seems rather old. What is the modern way of doing this? Below is my find module, I'm not sure if I'm doing it "the right way": # Try to find the vsvars32.bat file if( MSVC_VERSION EQUA

Re: [CMake] linking: absolute path vs -l

2015-09-03 Thread Alexander Neundorf
On Wednesday, September 02, 2015 22:12:39 Nico Schlömer wrote: > Indeed, > ``` > get_target_property(out ${netCDF_LIBRARIES} LOCATION) > message(${out}) > ``` > gives > ``` > /usr/lib/x86_64-linux-gnu/libnetcdf.so.7.3.0 > ``` > This value appears to be set in the CMake export file > ``` > /usr/lib/

[CMake] Protobuf Libraries not found on OS X

2015-09-03 Thread Michael Jackson
I have compiled the Protocol Buffer library on OS X and I am using the following CMake code to try and find the compiled libraries: find_package(Protobuf REQUIRED) but when configuring I get the usual CMake Error: The following variables are used in this project, but they are set to NOTFOUND.

Re: [CMake] No-op command?

2015-09-03 Thread Philip Semanchuk
On 9/3/2015 1:59 AM, Petr Kmoch wrote: Hi Philip. You don't need one. This is a perfectly valid piece of CMake code: if(CMAKE_SYSTEM_NAME STREQUAL "Windows") else() ... do something ... endif() Thanks, Petr, that never occurred to me! No wonder I couldn't find it in the documentation -- I