1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
##############################################################
# Copyright (c) 2008 Daniel Pfeifer #
# #
# Distributed under the Boost Software License, Version 1.0. #
##############################################################
# This module defines
# Firebird_INCLUDE_DIRS - where to find ibase.h
# Firebird_LIBRARIES - the libraries to link against to use Firebird
# Firebird_FOUND - true if Firebird was found
if (DEFINED FIREBIRD_INCLUDE_DIR)
message(DEPRECATION "FIREBIRD_INCLUDE_DIR has been deprecated. Use Firebird_INCLUDE_DIRS instead.")
set(Firebird_INCLUDE_DIRS "${FIREBIRD_INCLUDE_DIR}")
endif()
if (DEFINED FIREBIRD_LIBRARIES)
message(DEPRECATION "FIREBIRD_LIBRARIES has been deprecated. Use Firebird_LIBRARIES instead.")
set(Firebird_LIBRARIES "${FIREBIRD_LIBRARIES}")
endif()
find_path(Firebird_INCLUDE_DIRS ibase.h
/usr/include
$ENV{ProgramFiles}/Firebird/*/include
)
if (Firebird_SEARCH_EMBEDDED)
set(Firebird_LIB_NAMES fbembed)
else()
set(Firebird_LIB_NAMES fbclient fbclient_ms)
endif()
find_library(Firebird_LIBRARIES
NAMES
${Firebird_LIB_NAMES}
PATHS
/usr/lib
$ENV{ProgramFiles}/Firebird/*/lib
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Firebird
REQUIRED_VARS Firebird_LIBRARIES Firebird_INCLUDE_DIRS
)
add_library(Firebird INTERFACE)
target_link_libraries(Firebird INTERFACE ${Firebird_LIBRARIES})
target_include_directories(Firebird SYSTEM INTERFACE ${Firebird_INCLUDE_DIRS})
add_library(Firebird::Firebird ALIAS Firebird)
|