-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathSIOConfig.cmake.in
53 lines (47 loc) · 2.05 KB
/
SIOConfig.cmake.in
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
49
50
51
52
53
##############################################################################
# cmake configuration file for SIO
#
# Exported Targets
#
# SIO::sio : Base sio library
# SIO::sio-dump : sio-dump utility
#
# returns following variables:
#
# SIO_FOUND : set to TRUE if SIO found
# if FIND_PACKAGE called with REQUIRED and COMPONENTS arguments
# SIO_FOUND is only set to TRUE if ALL components are also found
# if REQUIRED is NOT set components may or may not be available
#
# SIO_VERSION : package version
# SIO_LIBRARIES : list of SIO libraries (NOT including COMPONENTS)
# SIO_INCLUDE_DIRS : list of paths to be used with INCLUDE_DIRECTORIES
#
# @author Jan Engels, Desy
# @author Remi Ete, Desy
##############################################################################
@PACKAGE_INIT@
SET( SIO_VERSION "@SIO_VERSION@" )
# ---------- include dirs -----------------------------------------------------
SET_AND_CHECK(SIO_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
# # do not store find results in cache
MARK_AS_ADVANCED( SIO_INCLUDE_DIRS )
# If we are not building zlib ourselves (and statically link to it) make sure
# that whatever zlib we found, is also found by the dependencies
IF(NOT @SIO_BUILTIN_ZLIB@)
INCLUDE(CMakeFindDependencyMacro)
FIND_DEPENDENCY(ZLIB)
ENDIF()
# # ---------- libraries --------------------------------------------------------
IF(NOT TARGET SIO::sio)
INCLUDE("${CMAKE_CURRENT_LIST_DIR}/SIOTargets.cmake")
ENDIF()
# ---------- final checking ---------------------------------------------------
INCLUDE( FindPackageHandleStandardArgs )
# set SIO_FOUND to TRUE if all listed variables are TRUE and not empty
# SIO_COMPONENT_VARIABLES will be set if FIND_PACKAGE is called with REQUIRED argument
# Get the location from the target and ensure that it is present with the call below
GET_PROPERTY(SIO_LIBRARY_TEST TARGET SIO::sio PROPERTY LOCATION)
SET(SIO_LIBRARIES SIO::sio)
MARK_AS_ADVANCED(SIO_LIBRARIES)
FIND_PACKAGE_HANDLE_STANDARD_ARGS( SIO DEFAULT_MSG SIO_INCLUDE_DIRS SIO_LIBRARIES SIO_LIBRARY_TEST)