fix build without Qt
This commit is contained in:
@@ -13,44 +13,46 @@ if ("x${CMAKE_MODULE_PATH}" STREQUAL "x")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(PIP REQUIRED)
|
find_package(PIP REQUIRED)
|
||||||
|
find_package(QAD)
|
||||||
include(SHSTKMacros)
|
include(SHSTKMacros)
|
||||||
include(QtWraps)
|
|
||||||
shstk_begin_project(cd CD)
|
shstk_begin_project(cd CD)
|
||||||
include(SHSTKQtMacros)
|
if(QAD_FOUND)
|
||||||
|
include(QtWraps)
|
||||||
|
include(SHSTKQtMacros)
|
||||||
|
|
||||||
shstk_qt_founded(QtVersions)
|
shstk_qt_founded(QtVersions)
|
||||||
foreach(_v ${_QT_VERSIONS_})
|
foreach(_v ${_QT_VERSIONS_})
|
||||||
#message("Qt ${_v} -> ${QtVersions}")
|
#message("Qt ${_v} -> ${QtVersions}")
|
||||||
option(Qt${_v} "Build for Qt${_v}" ON)
|
option(Qt${_v} "Build for Qt${_v}" ON)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
option(UTILS "Build various utils" ${_plugins_default_})
|
option(UTILS "Build various utils" ${_plugins_default_})
|
||||||
|
|
||||||
macro(cd_library NAME _MODULES _LIBS)
|
macro(cd_library NAME _MODULES _LIBS)
|
||||||
shstk_qt_project(cd_${NAME} FALSE "cd" "${_MODULES}" "${_LIBS}" ${ARGN})
|
shstk_qt_project(cd_${NAME} FALSE "cd" "${_MODULES}" "${_LIBS}" ${ARGN})
|
||||||
shstk_qt_install("cd" FALSE cd_${NAME} "${out_HDR}" "out_QM")
|
shstk_qt_install("cd" FALSE cd_${NAME} "${out_HDR}" "out_QM")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(cd_application NAME _MODULES _LIBS)
|
macro(cd_application NAME _MODULES _LIBS)
|
||||||
shstk_qt_project(${NAME} TRUE "cd" "${_MODULES}" "${_LIBS}" ${ARGN})
|
shstk_qt_project(${NAME} TRUE "cd" "${_MODULES}" "${_LIBS}" ${ARGN})
|
||||||
shstk_qt_install("cd" TRUE ${NAME} "" "out_QM")
|
shstk_qt_install("cd" TRUE ${NAME} "" "out_QM")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(cd_plugin NAME _MODULES _LIBS)
|
macro(cd_plugin NAME _MODULES _LIBS)
|
||||||
shstk_qt_plugin(cd_${NAME} "${_MODULES}" "cd_${NAME};${_LIBS}")
|
shstk_qt_plugin(cd_${NAME} "${_MODULES}" "cd_${NAME};${_LIBS}")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
shstk_install(cd FALSE "" "${cd_VERSION_FILE}")
|
shstk_install(cd FALSE "" "${cd_VERSION_FILE}")
|
||||||
file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in")
|
file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in")
|
||||||
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
|
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
|
||||||
|
|
||||||
set(_qt_libs cd_core)
|
set(_qt_libs cd_core)
|
||||||
set(_qt_plugs)
|
set(_qt_plugs)
|
||||||
set(_qt_apps )
|
set(_qt_apps )
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory(libs)
|
add_subdirectory(libs)
|
||||||
if (UTILS)
|
if (UTILS AND QAD_FOUND)
|
||||||
add_subdirectory(utils)
|
add_subdirectory(utils)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
cd_library(qt "Gui;Widgets" "cd_core;QAD::PIQt;QAD::Graphic")
|
if (QAD_FOUND)
|
||||||
|
cd_library(qt "Gui;Widgets" "cd_core;QAD::PIQt;QAD::Graphic")
|
||||||
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user