cmake_minimum_required(VERSION 3.13)
project(qglengine_widgets)
if (POLICY CMP0017)
	cmake_policy(SET CMP0017 NEW)
endif()
qad_find_qt(Qt5 Qt6 Core Gui Widgets)
qad_sources(SRC)
qad_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
file(GLOB PHS "*_p.h")
list(REMOVE_ITEM out_HDR "${PHS}")
import_version(${PROJECT_NAME} QGLEngine)
set_deploy_property(${PROJECT_NAME} ${QGLEngine_LIB_TYPE}
	LABEL "QGLEngine widgets library"
	FULLNAME "${QGLEngine_DOMAIN}.${PROJECT_NAME}"
	COMPANY  "${QGLEngine_COMPANY}"
	INFO "QGLEngine widgets library")
make_rc(${PROJECT_NAME} _RC)
qad_add_library(${PROJECT_NAME} ${QGLEngine_LIB_TYPE} out_CPP ${_RC})
qad_generate_export_header(${PROJECT_NAME})
list(APPEND out_HDR "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_export.h")
qad_target_link_libraries(${PROJECT_NAME} QAD::Widgets qglengine_core)
qad_target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" "${_qglengine_root_build}")
list(APPEND QT_MULTILIB_LIST ${PROJECT_NAME})
shstk_copy_to_parent()
#message(STATUS "Building ${PROJECT_NAME}")
shstk_qad_install("qglengine" FALSE "${PROJECT_NAME}" "${out_HDR}" "out_QM")
