1
# Fesslix - Stochastic Analysis
2
# Copyright (C) 2010-2016 Wolfgang Betz
4
# Fesslix is free software: you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation, either version 3 of the License, or
7
# (at your option) any later version.
9
# Fesslix is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU General Public License for more details.
14
# You should have received a copy of the GNU General Public License
15
# along with Fesslix. If not, see <http://www.gnu.org/licenses/>.
17
# - Try to find Fesslix (development)
18
# Once done this will define
19
# FLXLIB_FOUND - System has Fesslix
20
# FLXLIB_INCLUDE_DIRS - The Fesslix include directories
21
# FLXLIB_LIBRARIES - The libraries needed to use Fesslix
22
# FLXLIB_LIB_DIR - The directory containing Fesslix libraries
24
find_package(PkgConfig)
25
pkg_check_modules(PC_FLXLIB QUIET liboctave)
27
find_path(FLXLIB_INCLUDE_DIR "flxexception.h"
28
HINTS $ENV{HOME}/projects/flx_attach/flxlib/src ${PC_FLXLIB_INCLUDEDIR} ${PC_FLXLIB_INCLUDE_DIRS}
29
PATH_SUFFIXES "fesslix/"
30
DOC "Directory of the Flxlib-headers"
34
FIND_LIBRARY(FLXLIB_LIBRARY_FUNCTION flxfunction
35
HINTS ${FLXLIB_INCLUDE_DIR} ${FLXLIB_INCLUDE_DIR}/../lib ${FLXLIB_INCLUDE_DIR}/../build/src/ $ENV{HOME}/apps/lib ${FLXLIB_INCLUDE_DIR}/../ ${PC_FLXLIB_LIBDIR} ${PC_FLXLIB_LIBRARY_DIRS}
36
DOC "Path to library flxfunction.so"
39
FIND_LIBRARY(FLXLIB_LIBRARY_FUNCTION flxlib
40
HINTS ${PC_FLXLIB_LIBDIR} ${PC_FLXLIB_LIBRARY_DIRS} ${FLXLIB_INCLUDE_DIR} ${FLXLIB_INCLUDE_DIR}/../lib ${FLXLIB_INCLUDE_DIR}/../build/src/ $ENV{HOME}/apps/lib ${FLXLIB_INCLUDE_DIR}/../
41
DOC "Path to library flxlib.dll"
45
get_filename_component(FLXLIB_LIB_DIR ${FLXLIB_LIBRARY_FUNCTION} DIRECTORY)
47
set(FLXLIB_LIBRARY ${FLXLIB_LIBRARY_FUNCTION} )
49
set(FLXLIB_LIBRARIES ${FLXLIB_LIB_DIR}/libflxio.so ${FLXLIB_LIB_DIR}/libflxmtx.so ${FLXLIB_LIB_DIR}/libflxfunction.so ${FLXLIB_LIB_DIR}/libflxostools.so )
51
set(FLXLIB_LIBRARIES ${FLXLIB_LIBRARY_FUNCTION} )
53
set(FLXLIB_INCLUDE_DIRS ${FLXLIB_INCLUDE_DIR} )
55
include(FindPackageHandleStandardArgs)
56
# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE
57
# if all listed variables are TRUE
58
find_package_handle_standard_args(Flxlib DEFAULT_MSG
59
FLXLIB_LIBRARY FLXLIB_LIB_DIR FLXLIB_INCLUDE_DIR)