Skip to content
Snippets Groups Projects
Commit 2434f024 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

Use FindLibrary() cmake command to properly locate the library, even if the...

Use FindLibrary() cmake command to properly locate the library, even if the directory is already known. This is needed to get the proper full path reference to the library.
parent 9c2ac572
No related branches found
No related tags found
No related merge requests found
......@@ -6,19 +6,27 @@
# @PROJECT_NAME@_VERSION : the package version
# @PROJECT_NAME@_INCLUDE_DIRS : path to the include directory
# @PROJECT_NAME@_LIBRARY_DIRS : path to the library directory
# @PROJECT_NAME@_LIBRARIES : the provided libraries
# @PROJECT_NAME@_LIBRARIES : additional libraries the depending project needs to link against. The library provided
# by the package @PROJECT_NAME@ will be added automatically
# @PROJECT_NAME@_CXX_FLAGS : additional C++ compiler flags
# @PROJECT_NAME@_LINKER_FLAGS : additional linker flags
#
# @author Martin Killenberg, DESY
#
# The library itself must be "searched" using the FIND_LIBRARY command in the known install directory, to set
# the variable properly
FIND_LIBRARY(@PROJECT_NAME@_LIBRARY @PROJECT_NAME@
@CMAKE_INSTALL_PREFIX@/lib
NO_DEFAULT_PATH
)
# Since this file is already part of the installation to be found, the configuration can be hard-coded at
# installation time
set(@PROJECT_NAME@_VERSION "@@PROJECT_NAME@_SOVERSION@")
set(@PROJECT_NAME@_INCLUDE_DIRS @@PROJECT_NAME@_INCLUDE_DIRS@)
set(@PROJECT_NAME@_LIBRARY_DIRS @@PROJECT_NAME@_LIBRARY_DIRS@)
set(@PROJECT_NAME@_LIBRARIES @@PROJECT_NAME@_LIBRARIES@)
set(@PROJECT_NAME@_LIBRARIES ${@PROJECT_NAME@_LIBRARY} @@PROJECT_NAME@_LIBRARIES@)
set(@PROJECT_NAME@_CXX_FLAGS "@@PROJECT_NAME@_CXX_FLAGS@")
set(@PROJECT_NAME@_LINKER_FLAGS "@@PROJECT_NAME@_LINKER_FLAGS@")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment