[Cmake-commits] CMake branch, master, updated. v3.11.2-836-g64946ff

2018-05-25 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  64946fff30d32f815f73cc4c6529f76f7aefee16 (commit)
  from  46b26b52c9e4a308dbb9efbca062ae15a2a2d47c (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=64946fff30d32f815f73cc4c6529f76f7aefee16
commit 64946fff30d32f815f73cc4c6529f76f7aefee16
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Sat May 26 00:01:10 2018 -0400
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Sat May 26 00:01:10 2018 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 36f8c7e..1b0e9dd 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 11)
-set(CMake_VERSION_PATCH 20180525)
+set(CMake_VERSION_PATCH 20180526)
 #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] pkg-config file format versus CMake packages

2018-05-25 Thread Paul Fultz II via CMake

> On May 25, 2018, at 8:07 AM, Brad King  wrote:
> 
> On 05/24/2018 07:39 PM, Paul Fultz II wrote:
>>> On May 24, 2018, at 8:07 AM, Brad King wrote:
>>> The `.pc` file format is too flat to lend itself well to representing
>>> all the information we need.  
>> 
>> What do you mean? What information can't be represented?
> 
> Try running CMake's ExportImport test and take a look at the
> files generated by export() and install(EXPORT).  If anyone
> can use `.pc` files as a package representation for everything
> that test does on all platforms then I'd like to see a proposal.

Yes, and what seems to be missing from pkg-config to represent that information 
is the ability to put a direct path to the library(instead of using the -l and 
-L flags), and support for a `Replaces` field. 

This is also the same shortcomings talked about in the CPS document as well. 
Resolving these shortcomings, will allow pkg-config to represent the same thing 
as CPS and cmake. What else is missing? 

The reason I say this is that extending pkg-config seems like it would help 
adoption rather then creating a completely new format. There is already a good 
portion of open source projects that already support pkg-config, so tweaking 
them to support more complicated scenarios seems easier than converting 
everything to a new format.

Paul
-- 

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-developers] Error handling in dashboard scripts

2018-05-25 Thread Kyle Edwards

Hi all,

I'm working on a set of build scripts that use CMake and CTest, and I'm 
trying to figure out the best way to handle failures in CTest (I'm using 
a dashboard script internally.) If the configure or build step fails, I 
want the failure to be reported to CDash with ctest_submit(), but I also 
want CTest to exit with an error code so that the calling process can 
detect a failure.


The documentation for ctest_configure(), ctest_build(), and 
ctest_submit() isn't completely clear on what happens if one of these 
steps fails. Let's say I have the following dashboard script (this is 
pseudocode, arguments have been deliberately omitted for brevity, this 
example won't work):


ctest_start()
ctest_configure()
ctest_build()
ctest_test()
ctest_submit()

What happens if ctest_configure() fails (for example, because CMake 
failed to find a needed library)? Does the entire script stop right 
there? Or does it continue and try to execute ctest_build() anyway? Does 
ctest_build() silently do nothing because the configure step failed? 
Looking through the documentation for ctest_configure() and 
ctest_build(), I see some information on the RETURN_VALUE and 
CAPTURE_CMAKE_ERROR arguments, but it's not clear what happens if these 
aren't used.


If someone could clarify for me what's supposed to happen here, and what 
the recommended best practices are for making sure that ctest_submit() 
still gets called in the event of a failure, I will gladly submit a 
documentation patch with this information. I'm guessing it involves 
using the RETURN_VALUE and CAPTURE_CMAKE_ERROR arguments, but the 
documentation doesn't state this.


Kyle
--

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-developers


Re: [cmake-developers] How to handle dependencies of protobuf files ?

2018-05-25 Thread Alexander Neundorf
Any comments ?

Alex

On 2018 M05 15, Tue 21:45:06 CEST Alexander Neundorf wrote:
> Hi,
> 
> I stumbled upon a problem with protobuf files, I attached a testcase.
> There is a MyBase.proto, which is "imported" by Complex.proto.
> If MyBase.proto is modified, protoc is run again in MyBase.proto, but not on
> Complex.proto, although it should.
> You can have a look at the attached example.
> 
> The message MyData (in Complex.proto) has a member MyBase b1.
> If I rename the message MyBase (in MyBase.proto) e.g. to MyBaseXYZ, then the
> build fails, because Complex.pb.h was not regenerated, so it still refered
> to the now not existing class MyBase.
> 
> Is there already a solution to handle this ?
> 
> I think to do it properly, there would have to be a dependency scanning for
> proto files like there is for C/C++ headers.
> Parsing at the proto-files at cmake time wouldn't be good enough (since
> editing a proto file doesn't trigger a cmake run).
> 
> Comments ?
> 
> Alex


-- 

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-developers


Re: [CMake] problem with CMake not including library's path (with pkg-config)

2018-05-25 Thread Rolf Eike Beer
Am Freitag, 25. Mai 2018, 18:53:43 schrieb Francesco Abbate:
> Hi,
> 
> thank you for the help.
> 
> As suggested by Andreas, AGG_LDFLAGS does what I think should be done
> and it works for me.
> 
> As for the IMPORTED_TARGET approach, I still need to explicitly call
> target_include_directories() and in addition the options given to the
> linker with PkgConfig::AGG seems to be wrong. I am quite inclined to
> forgot about this IMPORTED_TARGET approach, I prefer to use the more
> simple approach that works.

I would like to hear that story, just in case the module still has bugs. But 
please try with a recent development snapshot of CMake as there have been some 
additional fixes to the module recently.

Eike
-- 


signature.asc
Description: This is a digitally signed message part.
-- 

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] integrating cmake configured library with other GNU based build system?

2018-05-25 Thread Burlen Loring

Hi All,

Can cmake generate .pc files? Can cmake generate .la files (gnu 
convenience libraries)? Cmake internally generates all the requisite 
info, how can it be accessed?


I have to integrate a cmake based library into a GNUMake build. The 
project has a cmake config file 
 
which works great with cmake's find_package command when integrating 
with another project using cmake. What do we do when a GNUMake based 
project wants to import our library?


I hacked a cmake script 
 
to recursively walk our libraries dependencies and inspect 
INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_LINK_LIBRARIES to put 
together a unique list of libraries and include dirs, which can be used 
to generate the necessary info. Unfortunately so far I can only make it 
work as an external cmake project which is configured after we install 
our library.


I would like to have a solution that generates the GNU compatible 
configuration file (.pc,.la, etc)  integrated into our build rather than 
as an additional separate post install step. How have others solved this 
issue?


Thanks
Burlen


-- 

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] problem with CMake not including library's path (with pkg-config)

2018-05-25 Thread Francesco Abbate
Hi,

thank you for the help.

As suggested by Andreas, AGG_LDFLAGS does what I think should be done
and it works for me.

As for the IMPORTED_TARGET approach, I still need to explicitly call
target_include_directories() and in addition the options given to the
linker with PkgConfig::AGG seems to be wrong. I am quite inclined to
forgot about this IMPORTED_TARGET approach, I prefer to use the more
simple approach that works.

If I can suggest something to the cmake developers: please make a more
extensive introduction by covering more common cases. For example the
standard cmake introduction does not mention how to find and use with
an external library. I had to use google and stackoverflow to find the
bit of information I needed. just my two cents.

Kind regards
Francesco
-- 

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.11.2-835-g46b26b5

2018-05-25 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  46b26b52c9e4a308dbb9efbca062ae15a2a2d47c (commit)
   via  266fd716540f0e83879de01a82f289caf35c463b (commit)
   via  9b5161e24fd5f5bebf2fabc3170232f778501141 (commit)
   via  f5d19260f9a05cc4a6a4f94e6d344702586b2c0f (commit)
   via  9455512d22d57a884024c881256a2d35cceedbd9 (commit)
   via  b37d583d5cec72a96b8f54d775a7432418c2fc08 (commit)
   via  45c4a75d271f25af1ff4083b02793b79e8e11eee (commit)
  from  cf723c493ef38c58c80b8067ac4a1968bacf810d (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=46b26b52c9e4a308dbb9efbca062ae15a2a2d47c
commit 46b26b52c9e4a308dbb9efbca062ae15a2a2d47c
Merge: 266fd71 b37d583
Author: Brad King 
AuthorDate: Fri May 25 13:26:54 2018 +
Commit: Kitware Robot 
CommitDate: Fri May 25 09:29:12 2018 -0400

Merge topic 'FindPerl-strawberry'

b37d583d5c FindPerl: Add support for Strawberry Perl

Acked-by: Kitware Robot 
Merge-request: !2102


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=266fd716540f0e83879de01a82f289caf35c463b
commit 266fd716540f0e83879de01a82f289caf35c463b
Merge: 9b5161e f5d1926
Author: Brad King 
AuthorDate: Fri May 25 13:26:13 2018 +
Commit: Kitware Robot 
CommitDate: Fri May 25 09:26:21 2018 -0400

Merge topic 'FindLua-conventional-paths'

f5d19260f9 FindLua: Search for lua.h using more conventional paths
9455512d22 FindLua: Add tests for this module

Acked-by: Kitware Robot 
Merge-request: !2095


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9b5161e24fd5f5bebf2fabc3170232f778501141
commit 9b5161e24fd5f5bebf2fabc3170232f778501141
Merge: cf723c49 45c4a75
Author: Brad King 
AuthorDate: Fri May 25 13:25:12 2018 +
Commit: Kitware Robot 
CommitDate: Fri May 25 09:25:17 2018 -0400

Merge topic 'vs-scope'

45c4a75d27 cmVisualStudio10TargetGenerator: make sure each Elem has right 
scope

Acked-by: Kitware Robot 
Merge-request: !2096


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f5d19260f9a05cc4a6a4f94e6d344702586b2c0f
commit f5d19260f9a05cc4a6a4f94e6d344702586b2c0f
Author: Alexander Grund 
AuthorDate: Sun May 20 15:56:34 2018 +0200
Commit: Brad King 
CommitDate: Thu May 24 11:20:09 2018 -0400

FindLua: Search for lua.h using more conventional paths

Do not constrain the search to `include/*`.  To provide compatibility
the foreach-loop is still used. However `include/xxx` and `xxx` is now
both searched.  This honors now e.g. CMAKE_INCLUDE_PATH.

Fixes: #17999

diff --git a/Modules/FindLua.cmake b/Modules/FindLua.cmake
index 7eba206..8f35fc7 100644
--- a/Modules/FindLua.cmake
+++ b/Modules/FindLua.cmake
@@ -39,9 +39,16 @@
 unset(_lua_include_subdirs)
 unset(_lua_library_names)
 unset(_lua_append_versions)
+set(_lua_additional_paths
+  ~/Library/Frameworks
+  /Library/Frameworks
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+  /opt)
 
 # this is a function only to have all the variables inside go away 
automatically
-function(_lua_set_version_vars)
+function(_lua_get_versions)
 set(LUA_VERSIONS5 5.3 5.2 5.1 5.0)
 
 if (Lua_FIND_VERSION_EXACT)
@@ -59,6 +66,10 @@ function(_lua_set_version_vars)
 list(APPEND _lua_append_versions ${subver})
 endif ()
 endforeach ()
+# New version -> Search for it (heuristic only! Defines in 
include might have changed)
+if (NOT _lua_append_versions)
+set(_lua_append_versions 
${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR})
+endif()
 endif ()
 endif ()
 else ()
@@ -66,22 +77,42 @@ function(_lua_set_version_vars)
 set(_lua_append_versions ${LUA_VERSIONS5})
 endif ()
 
-list(APPEND _lua_include_subdirs "include/lua" "include")
+if (LUA_Debug)
+message(STATUS "Considering following Lua versions: 
${_lua_append_versions}")
+endif()
+
+set(_lua_append_versions "${_lua_append_versions}" PARENT_SCOPE)
+endfunction()
+
+function(_lua_set_version_vars)
+   set(_lua_include_subdirs_raw "lua")
 
 foreach (ver IN LISTS _lua_append_versions)
 string(REGEX MATCH "^([0-9]+)\\.([0-9]+)$" _ver "${ver}")
-list(APPEND _lua_include_subdirs

[Cmake-commits] CMake branch, master, updated. v3.11.2-828-gcf723c49

2018-05-25 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  cf723c493ef38c58c80b8067ac4a1968bacf810d (commit)
   via  357db10bd1e154a5f5092b55395a236bb40dc5d6 (commit)
  from  a9bab1443eed2763cd972ac2c50942667c13cd8d (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=cf723c493ef38c58c80b8067ac4a1968bacf810d
commit cf723c493ef38c58c80b8067ac4a1968bacf810d
Merge: a9bab14 357db10
Author: Brad King 
AuthorDate: Fri May 25 13:23:10 2018 +
Commit: Kitware Robot 
CommitDate: Fri May 25 09:23:52 2018 -0400

Merge topic 'FindODBC-module'

357db10bd1 FindODBC: Add module to search for ODBC library

Acked-by: Kitware Robot 
Merge-request: !2069


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=357db10bd1e154a5f5092b55395a236bb40dc5d6
commit 357db10bd1e154a5f5092b55395a236bb40dc5d6
Author: Mateusz Loskot 
AuthorDate: Fri May 11 22:31:01 2018 +0200
Commit: Mateusz Loskot 
CommitDate: Tue May 22 21:29:22 2018 +0200

FindODBC: Add module to search for ODBC library

Add tests for FindODBC module.

diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst
index 3bfaa54..8ef4d7d 100644
--- a/Help/manual/cmake-modules.7.rst
+++ b/Help/manual/cmake-modules.7.rst
@@ -156,6 +156,7 @@ All Modules
/module/FindMPEG2
/module/FindMPEG
/module/FindMPI
+   /module/FindODBC
/module/FindOpenACC
/module/FindOpenAL
/module/FindOpenCL
diff --git a/Help/module/FindODBC.rst b/Help/module/FindODBC.rst
new file mode 100644
index 000..8558334
--- /dev/null
+++ b/Help/module/FindODBC.rst
@@ -0,0 +1 @@
+.. cmake-module:: ../../Modules/FindODBC.cmake
diff --git a/Help/release/dev/FindODBC-module.rst 
b/Help/release/dev/FindODBC-module.rst
new file mode 100644
index 000..f270e8e
--- /dev/null
+++ b/Help/release/dev/FindODBC-module.rst
@@ -0,0 +1,5 @@
+FindODBC-module
+---
+
+* A :module:`FindODBC` module was added to find an Open Database Connectivity
+  (ODBC) library.
diff --git a/Modules/FindODBC.cmake b/Modules/FindODBC.cmake
new file mode 100644
index 000..c8ca477
--- /dev/null
+++ b/Modules/FindODBC.cmake
@@ -0,0 +1,227 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+#[===[.rst:
+FindODBC
+
+
+Find an Open Database Connectivity (ODBC) include directory and library.
+
+On Windows, when building with Visual Studio, this module assumes the ODBC
+library is provided by the available Windows SDK.
+
+On Unix, this module allows to search for ODBC library provided by
+unixODBC or iODBC implementations of ODBC API.
+This module reads hint about location of the config program:
+
+.. variable:: ODBC_CONFIG
+
+  Location of odbc_config or iodbc-config program
+
+Otherwise, this module tries to find the config program,
+first from unixODBC, then from iODBC.
+If no config program found, this module searches for ODBC header
+and library in list of known locations.
+
+Imported targets
+
+
+This module defines the following :prop_tgt:`IMPORTED` targets:
+
+.. variable:: ODBC::ODBC
+
+  Imported target for using the ODBC library, if found.
+
+Result variables
+
+
+.. variable:: ODBC_FOUND
+
+  Set to true if ODBC library found, otherwise false or undefined.
+
+.. variable:: ODBC_INCLUDE_DIRS
+
+  Paths to include directories listed in one variable for use by ODBC client.
+  May be empty on Windows, where the include directory corresponding to the
+  expected Windows SDK is already available in the compilation environment.
+
+.. variable:: ODBC_LIBRARIES
+
+  Paths to libraries to linked against to use ODBC.
+  May just a library name on Windows, where the library directory corresponding
+  to the expected Windows SDK is already available in the compilation 
environment.
+
+.. variable:: ODBC_CONFIG
+
+  Path to unixODBC or iODBC config program, if found or specified.
+
+Cache variables
+^^^
+
+For users who wish to edit and control the module behavior, this module
+reads hints about search locations from the following variables:
+
+.. variable:: ODBC_INCLUDE_DIR
+
+  Path to ODBC include directory with ``sql.h`` header.
+
+.. variable:: ODBC_LIBRARY
+
+  Path to ODBC library to be linked.
+
+These variables should not be used directly by project code.
+
+Limitations
+^^^
+
+On Windows, this module does not 

Re: [CMake] pkg-config file format versus CMake packages

2018-05-25 Thread Brad King
On 05/24/2018 07:39 PM, Paul Fultz II wrote:
>> On May 24, 2018, at 8:07 AM, Brad King wrote:
>> The `.pc` file format is too flat to lend itself well to representing
>> all the information we need.  
> 
> What do you mean? What information can't be represented?

Try running CMake's ExportImport test and take a look at the
files generated by export() and install(EXPORT).  If anyone
can use `.pc` files as a package representation for everything
that test does on all platforms then I'd like to see a proposal.

-Brad
-- 

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] problem with CMake not including library's path (with pkg-config)

2018-05-25 Thread Rolf Eike Beer

Am 2018-05-24 18:48, schrieb Francesco Abbate:

Hi all,

I stumbled in a problem with CMake. Everything is working fine except
that, for two libraries that I locate with pkg-config, cmake does not
include during linking the library's path (-L) which is given by
pkg-config.


Here an extract of the CMakeLists.txt:


[...]

include(FindPkgConfig)
pkg_search_module(AGG REQUIRED libagg)

[...]

target_link_libraries(libcanvas ${AGG_LIBRARIES})
target_include_directories(libcanvas PUBLIC
${PROJECT_SOURCE_DIR}/include ${AGG_INCLUDE_DIRS})
[...]


Yes, this is a known shortcoming. But there is already help available!

For CMake >= 3.7 you can ask FindPkgConfig to create an imported target 
for you, which will then include not only the library paths, but also 
the include directories, so you do not need to explicitely call 
target_include_directories() anymore:


pkg_search_module(AGG REQUIRED IMPORTED_TARGET libagg)

target_link_libraries(libcanvas PkgConfig::AGG)

I strongly encourage you to go this way as it also drags in needed 
defines and the like.


If you can't go that route for whatever reason you need to do

link_directories(${AGG_LIBRARY_DIRS})

Side note: this is the only place I can still accept the usage of that 
command.


And since it's crappy that you have the full library path in the target, 
but not in a variable, there will be _LINK_LIBARIES from CMake 
3.12 on, which would be the thing you pass to target_link_libraries() 
instead and which has the exact same information the imported target 
already has.


Greetings,

Eike
--

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