JustUI/cmake/FindJustUI.cmake
2021-03-12 16:19:43 +01:00

19 lines
590 B
CMake

include(FindSimpleLibrary)
include(FindPackageHandleStandardArgs)
find_package(Gint 2.1 REQUIRED)
find_simple_library("libjustui-${FXSDK_PLATFORM}.a" include/justui/config.h
"J_VERSION" PATH_VAR J_PATH VERSION_VAR J_VERSION)
find_package_handle_standard_args(JustUI
REQUIRED_VARS J_PATH J_VERSION
VERSION_VAR J_VERSION)
if(JustUI_FOUND)
add_library(JustUI::JustUI UNKNOWN IMPORTED)
set_target_properties(JustUI::JustUI PROPERTIES
IMPORTED_LOCATION "${J_PATH}"
INTERFACE_LINK_OPTIONS -ljustui-${FXSDK_PLATFORM}
IMPORTED_LINK_INTERFACE_LIBRARIES Gint::Gint)
endif()