Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drop-in files for finding SHOGUN from CMake or pkg-config
- Loading branch information
Björn Esser
committed
Dec 30, 2013
1 parent
63624a0
commit 8ea8b12
Showing
4 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# CMake-Config file for SHOGUN Machine Learning Toolbox | ||
# Copyright (C) 2013 Björn Esser <besser82@fedoraproject.org> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
# | ||
# It defines the following variables | ||
# @PROJECT_NAME_UPPER@_INCLUDE_DIRS - include directories for lib@PROJECT_NAME@ | ||
# @PROJECT_NAME_UPPER@_LIBRARIES - libraries to link against | ||
# @PROJECT_NAME_UPPER@_LIBRARIES_DIR - installation directory of lib@PROJECT_NAME@.so | ||
# @PROJECT_NAME_UPPER@_CXXFLAGS - flags to pass to the C-compiler | ||
# @PROJECT_NAME_UPPER@_CXXFLAGS - flags to pass to the C++-compiler | ||
# @PROJECT_NAME_UPPER@_LDFLAGS - flags to pass to the linker | ||
|
||
##### Compute paths ##### | ||
GET_FILENAME_COMPONENT( @PROJECT_NAME_UPPER@_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH ) | ||
IF( EXISTS "${@PROJECT_NAME_UPPER@_CMAKE_DIR}/CMakeCache.txt" ) | ||
INCLUDE( "${@PROJECT_NAME_UPPER@_CMAKE_DIR}/configs/@PROJECT_NAME_CAPITAL@BuildTreeSettings.cmake" ) | ||
ELSE() | ||
SET( @PROJECT_NAME_UPPER@_INCLUDE_DIRS "@INCLUDE_INSTALL_DIR@/@PROJECT_NAME@" ) | ||
ENDIF() | ||
|
||
|
||
##### Our library dependencies (contains definitions for IMPORTED targets) ##### | ||
INCLUDE( "${@PROJECT_NAME_UPPER@_CMAKE_DIR}/@PROJECT_NAME_CAPITAL@LibraryDepends.cmake" ) | ||
|
||
|
||
##### These are IMPORTED targets created by @PROJECT_NAME_CAPITAL@LibraryDepends.cmake ##### | ||
SET( @PROJECT_NAME_UPPER@_LIBRARIES "@PROJECT_NAME@" ) | ||
SET( @PROJECT_NAME_UPPER@_LIBRARIES_DIR "@LIB_INSTALL_DIR@" ) | ||
|
||
|
||
##### These are the flags for compiler and linker ##### | ||
SET( @PROJECT_NAME_UPPER@_CFLAGS "-I\"${@PROJECT_NAME_UPPER@_INCLUDE_DIRS}\"" ) | ||
SET( @PROJECT_NAME_UPPER@_CXXFLAGS "${@PROJECT_NAME_UPPER@_CFLAGS}" ) | ||
SET( @PROJECT_NAME_UPPER@_LDFLAGS "-L\"${@PROJECT_NAME_UPPER@_LIBRARIES_DIR}\" -l${@PROJECT_NAME_UPPER@_LIBRARIES}" ) | ||
|
||
|
||
##### Give a reply about @PROJECT_NAME_UPPER@ has been found ##### | ||
MESSAGE( STATUS "Found @PROJECT_NAME_CAPITAL@: ${IMPORTED_LOCATION_RELEASE} (Version: \"@VERSION_EXPORT@\")" ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# CMake-Config file for SHOGUN Machine Learning Toolbox | ||
# Copyright (C) 2013 Björn Esser <besser82@fedoraproject.org> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
##### Define @PROJECT_NAME_UPPER@'s version ##### | ||
SET( PACKAGE_VERSION "@VERSION_EXPORT@" ) | ||
|
||
|
||
##### Check whether the requested PACKAGE_FIND_VERSION is compatible ##### | ||
IF( "${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) | ||
SET( PACKAGE_VERSION_COMPATIBLE FALSE ) | ||
ELSE( "${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) | ||
SET( PACKAGE_VERSION_COMPATIBLE TRUE ) | ||
IF( "${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}" ) | ||
SET( PACKAGE_VERSION_EXACT TRUE ) | ||
ENDIF( "${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}" ) | ||
ENDIF( "${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Package-Config file for SHOGUN Machine Learning Toolbox | ||
# Copyright (C) 2013 Björn Esser <besser82@fedoraproject.org> | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
|
||
prefix=@CMAKE_INSTALL_PREFIX@ | ||
exec_prefix=${prefix} | ||
datarootdir=${exec_prefix}/@SHARE_INSTALL_DIR_NOPREFIX@ | ||
datadir=${datarootdir}/@PROJECT_NAME@ | ||
libdir=${exec_prefix}/@LIB_INSTALL_DIR_NOPREFIX@ | ||
includedir=${exec_prefix}/@INCLUDE_INSTALL_DIR_NOPREFIX@ | ||
|
||
|
||
Name: @PROJECT_NAME@ | ||
Version: @VERSION_EXPORT@ | ||
Description: The SHOGUN Machine Learning Toolbox | ||
Libs: -l@PROJECT_NAME@ | ||
Cflags: -I${includedir}/@PROJECT_NAME@ |