2016-11-16 01:10:39 -08:00
|
|
|
# Once done these will be defined:
|
|
|
|
#
|
2022-03-16 15:11:06 -07:00
|
|
|
# RSSDK_FOUND RSSDK_INCLUDE_DIRS RSSDK_LIBRARIES
|
2016-11-16 01:10:39 -08:00
|
|
|
#
|
|
|
|
# For use in OBS:
|
|
|
|
#
|
2022-03-16 15:11:06 -07:00
|
|
|
# RSSDK_INCLUDE_DIR
|
2016-11-16 01:10:39 -08:00
|
|
|
|
|
|
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
2022-03-16 15:11:06 -07:00
|
|
|
set(_RSSDK_lib_dir "x64")
|
2016-11-16 01:10:39 -08:00
|
|
|
else()
|
2022-03-16 15:11:06 -07:00
|
|
|
set(_RSSDK_lib_dir "Win32")
|
2016-11-16 01:10:39 -08:00
|
|
|
endif()
|
|
|
|
|
2022-03-16 15:11:06 -07:00
|
|
|
find_path(
|
|
|
|
RSSDK_INCLUDE_DIR
|
|
|
|
NAMES pxcsession.h
|
|
|
|
HINTS ENV RSSDK_DIR
|
|
|
|
PATH_SUFFIXES include)
|
2016-11-16 01:10:39 -08:00
|
|
|
|
2022-03-16 15:11:06 -07:00
|
|
|
find_library(
|
|
|
|
RSSDK_LIB
|
|
|
|
NAMES libpxc
|
|
|
|
HINTS ENV RSSDK_DIR
|
|
|
|
PATH_SUFFIXES lib/${_RSSDK_lib_dir})
|
2016-11-16 01:10:39 -08:00
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(RSSDK DEFAULT_MSG RSSDK_LIB RSSDK_INCLUDE_DIR)
|
|
|
|
mark_as_advanced(RSSDK_INCLUDE_DIR RSSDK_LIB)
|
|
|
|
|
|
|
|
if(RSSDK_FOUND)
|
2022-03-16 15:11:06 -07:00
|
|
|
set(RSSDK_INCLUDE_DIRS ${RSSDK_INCLUDE_DIR})
|
|
|
|
set(RSSDK_LIBRARIES ${RSSDK_LIB})
|
|
|
|
|
|
|
|
if(NOT TARGET RSS::SDK)
|
|
|
|
if(IS_ABSOLUTE "${RSSDK_LIBRARIES}")
|
|
|
|
add_library(RSS:SDK UNKNOWN IMPORTED)
|
|
|
|
set_target_properties(RSS:SDK PROPERTIES IMPORTED_LOCATION
|
|
|
|
"${RSSDK_LIBRARIES}")
|
|
|
|
else()
|
|
|
|
add_library(RSS:SDK INTERFACE IMPORTED)
|
|
|
|
set_target_properties(RSS:SDK PROPERTIES IMPORTED_LIBNAME
|
|
|
|
"${RSSDK_LIBRARIES}")
|
|
|
|
endif()
|
2016-11-16 01:10:39 -08:00
|
|
|
|
2022-03-16 15:11:06 -07:00
|
|
|
set_target_properties(RSS:SDK PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
|
|
|
|
"${RSSDK_INCLUDE_DIRS}")
|
|
|
|
endif()
|
|
|
|
endif()
|