X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8c6fa3fbaccc22127280bf77a48fab5a3ee0716e..46b0747592074017ff0ea4b33d4a7194235886e5:/cmake/modules/FindFBClient.cmake diff --git a/cmake/modules/FindFBClient.cmake b/cmake/modules/FindFBClient.cmake new file mode 100644 index 00000000..5199beff --- /dev/null +++ b/cmake/modules/FindFBClient.cmake @@ -0,0 +1,22 @@ +find_path ( FBClient_INCLUDE_DIR NAMES ibase.h DOC "Path to FBClient header files." ) +mark_as_advanced ( FBClient_INCLUDE_DIR ) + +find_library ( FBClient_LIB NAMES fbclient DOC "Location of FBClient library." ) +mark_as_advanced ( FBClient_LIB ) + +include ( FindPackageHandleStandardArgs ) +find_package_handle_standard_args ( FBClient + REQUIRED_VARS FBClient_LIB FBClient_INCLUDE_DIR + VERSION_VAR FBClient_VERSION ) + +# Create the imported target +if ( FBClient_FOUND ) + set ( FBClient_INCLUDE_DIRS ${FBClient_INCLUDE_DIR} ) + set ( FBClient_LIBRARIES ${FBClient_LIB} ) + if ( NOT TARGET FBClient::FBClient ) + add_library ( FBClient::FBClient UNKNOWN IMPORTED ) + set_target_properties ( FBClient::FBClient PROPERTIES + IMPORTED_LOCATION "${FBClient_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${FBClient_INCLUDE_DIR}" ) + endif ( NOT TARGET FBClient::FBClient ) +endif ( FBClient_FOUND )