cmake refactoring

This commit is contained in:
2022-08-08 15:48:06 +03:00
parent 80e5f76ee4
commit 52056a44bb
3 changed files with 31 additions and 33 deletions

View File

@@ -6,7 +6,7 @@ endif()
if (POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()
project(qglengine)
project(QGLEngine)
find_package(QAD REQUIRED)
shstk_qt_founded(QtVersions)
set(_qgl_ok 0)
@@ -23,18 +23,18 @@ else()
find_package(OpenGL REQUIRED)
include(SHSTKQtMacros)
set(qglengine_MAJOR 1)
set(qglengine_MINOR 0)
set(qglengine_REVISION 0)
set(qglengine_SUFFIX "rc")
set(qglengine_COMPANY SHS)
set(qglengine_DOMAIN org.SHS)
set(QGLEngine_MAJOR 1)
set(QGLEngine_MINOR 0)
set(QGLEngine_REVISION 0)
set(QGLEngine_SUFFIX "rc")
set(QGLEngine_COMPANY SHS)
set(QGLEngine_DOMAIN org.SHS)
if ("x${CMAKE_MODULE_PATH}" STREQUAL "x")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
endif()
shstk_begin_project(qglengine QGLENGINE)
shstk_begin_project(QGLEngine)
qad_sources(SRC)
qad_sources(FSRC DIR "formats")
@@ -44,20 +44,20 @@ else()
qad_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
file(GLOB PHS "*_p.h" "formats/*_p.h" "core/*_p.h")
list(REMOVE_ITEM out_HDR "${PHS}")
import_version(qglengine_core qglengine)
set_deploy_property(qglengine_core ${qglengine_LIB_TYPE}
import_version(qglengine_core QGLEngine)
set_deploy_property(qglengine_core ${QGLEngine_LIB_TYPE}
LABEL "QGLEngine core library"
FULLNAME "${qglengine_DOMAIN}.qglengine_core"
COMPANY "${qglengine_COMPANY}"
FULLNAME "${QGLEngine_DOMAIN}.qglengine_core"
COMPANY "${QGLEngine_COMPANY}"
INFO "QGLEngine core library")
make_rc(qglengine_core _RC)
qad_add_library(qglengine_core ${qglengine_LIB_TYPE} out_CPP ${_RC})
qad_add_library(qglengine_core ${QGLEngine_LIB_TYPE} out_CPP ${_RC})
qad_generate_export_header(qglengine_core)
list(APPEND out_HDR "${CMAKE_CURRENT_BINARY_DIR}/qglengine_core_export.h")
list(APPEND out_HDR "${qglengine_VERSION_FILE}")
list(APPEND out_HDR "${QGLEngine_VERSION_FILE}")
qad_target_include_directories(qglengine_core PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/core")
qad_target_link_libraries(qglengine_core QAD::Widgets assimp ${OPENGL_LIBRARIES})
message(STATUS "Building QGLEngine version ${qglengine_VERSION} (${qglengine_LIB_TYPE_MSG}) for ${QtVersions}")
message(STATUS "Building QGLEngine version ${QGLEngine_VERSION} (${QGLEngine_LIB_TYPE_MSG}) for ${QtVersions}")
list(APPEND QT_MULTILIB_LIST qglengine_core)
add_subdirectory(widgets)
shstk_copy_to_parent()