Multi-Qt building
git-svn-id: svn://db.shs.com.ru/libs@250 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.6)
|
|||||||
project(libs)
|
project(libs)
|
||||||
set(LIBPROJECT 1)
|
set(LIBPROJECT 1)
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/pip/")
|
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/pip/")
|
||||||
cmake_policy(SET CMP0017 OLD)
|
#cmake_policy(SET CMP0017 OLD)
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
find_package(MinGW REQUIRED)
|
find_package(MinGW REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
@@ -48,21 +48,35 @@ endif()
|
|||||||
|
|
||||||
set(QAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/qad)
|
set(QAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/qad)
|
||||||
|
|
||||||
|
include(qad/QtWraps.cmake)
|
||||||
|
set(QtVersions)
|
||||||
|
foreach(_v ${_QT_VERSIONS_})
|
||||||
|
option(Qt${_v} "Build for Qt${_v}" 1)
|
||||||
|
if (Qt${_v})
|
||||||
|
#message("Qt${_v}")
|
||||||
|
list(APPEND QtVersions Qt${_v})
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_subdirectory(pip)
|
add_subdirectory(pip)
|
||||||
|
message(STATUS "Building Qt-derived targets for ${QtVersions}")
|
||||||
add_subdirectory(qad)
|
add_subdirectory(qad)
|
||||||
set(_DIRS piqt piqt_utils cd_utils qcd_utils)
|
set(_DIRS piqt piqt_utils qcd_utils)
|
||||||
if (QGLVIEW)
|
if (QGLVIEW)
|
||||||
list(APPEND _DIRS qglview)
|
list(APPEND _DIRS qglview)
|
||||||
endif()
|
endif()
|
||||||
|
foreach(_D ${_DIRS})
|
||||||
|
list(APPEND QT_MULTILIB_LIST ${D})
|
||||||
|
endforeach(_D)
|
||||||
|
list(INSERT _DIRS 0 cd_utils)
|
||||||
foreach(_D ${_DIRS})
|
foreach(_D ${_DIRS})
|
||||||
include_directories(${_D})
|
include_directories(${_D})
|
||||||
add_subdirectory(${_D})
|
add_subdirectory(${_D})
|
||||||
endforeach(_D)
|
endforeach(_D)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
get_filename_component(QTDIR ${QT_QMAKE_EXECUTABLE} PATH)
|
|
||||||
foreach(PIP_LT ${PIP_LIBS_TARGETS})
|
foreach(PIP_LT ${PIP_LIBS_TARGETS})
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pip/lib${PIP_LT}.dll" DESTINATION ${QTDIR})
|
qt_install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pip/lib${PIP_LT}.dll" DESTINATION QtBin)
|
||||||
endforeach()
|
endforeach()
|
||||||
set(CMAKES "FindMinGW.cmake")
|
set(CMAKES "FindMinGW.cmake")
|
||||||
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
|
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
|
||||||
|
|||||||
@@ -15,8 +15,11 @@ if(${MINGW})
|
|||||||
#if(NOT ${MINGW_INCLUDE}) MINGW_INCLUDE = ${MINGW_DIR}/include
|
#if(NOT ${MINGW_INCLUDE}) MINGW_INCLUDE = ${MINGW_DIR}/include
|
||||||
find_library(MINGW_LIB m HINTS ${MINGW_BIN}/../lib ${MINGW_INCLUDE}/../lib)
|
find_library(MINGW_LIB m HINTS ${MINGW_BIN}/../lib ${MINGW_INCLUDE}/../lib)
|
||||||
get_filename_component(MINGW_LIB ${MINGW_LIB} PATH)
|
get_filename_component(MINGW_LIB ${MINGW_LIB} PATH)
|
||||||
message(STATUS "Found MinGW binary path = ${MINGW_BIN}")
|
if (NOT _MGW_MSG)
|
||||||
message(STATUS "Found MinGW include path = ${MINGW_INCLUDE}")
|
set(_MGW_MSG 1 CACHE BOOL "msg_mingw" FORCE)
|
||||||
message(STATUS "Found MinGW library path = ${MINGW_LIB}")
|
message(STATUS "Found MinGW binary path = ${MINGW_BIN}")
|
||||||
|
message(STATUS "Found MinGW include path = ${MINGW_INCLUDE}")
|
||||||
|
message(STATUS "Found MinGW library path = ${MINGW_LIB}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif(${MINGW})
|
endif(${MINGW})
|
||||||
|
|||||||
@@ -6,17 +6,18 @@ macro(sdk_install _DIR _TARGET _H_FILES)
|
|||||||
#message("HFILES ${_H_FILES}")
|
#message("HFILES ${_H_FILES}")
|
||||||
install(FILES ${_H_FILES} DESTINATION ${MINGW_INCLUDE}/${_DIR})
|
install(FILES ${_H_FILES} DESTINATION ${MINGW_INCLUDE}/${_DIR})
|
||||||
endif()
|
endif()
|
||||||
install(TARGETS ${_TARGET} DESTINATION ${MINGW_LIB})
|
qt_install(TARGETS ${_TARGET} DESTINATION ${MINGW_LIB})
|
||||||
install(TARGETS ${_TARGET} DESTINATION ${MINGW_BIN})
|
qt_install(TARGETS ${_TARGET} DESTINATION ${MINGW_BIN})
|
||||||
get_filename_component(QTDIR ${QT_QMAKE_EXECUTABLE} PATH)
|
qt_install(TARGETS ${_TARGET} DESTINATION QtBin)
|
||||||
install(TARGETS ${_TARGET} DESTINATION ${QTDIR})
|
|
||||||
else()
|
else()
|
||||||
if (NOT _H_FILES STREQUAL "")
|
if (NOT _H_FILES STREQUAL "")
|
||||||
install(FILES ${_H_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${_DIR})
|
install(FILES ${_H_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/${_DIR})
|
||||||
endif()
|
endif()
|
||||||
install(TARGETS ${_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
qt_install(TARGETS ${_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
endif()
|
endif()
|
||||||
|
#message(STATUS "Install ${_TARGET} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${_TARGET} DESTINATION bin)
|
qt_install(TARGETS ${_TARGET} DESTINATION bin)
|
||||||
|
#message(STATUS "Install ${_TARGET} to local \"bin\"")
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|||||||
@@ -28,10 +28,10 @@ target_link_libraries(${PROJECT_NAME} ${PIP_LIBRARY})
|
|||||||
add_executable(cdutilstest "cdutilstest.cpp" "cdtest.h")
|
add_executable(cdutilstest "cdutilstest.cpp" "cdtest.h")
|
||||||
target_link_libraries(cdutilstest ${PIP_LIBRARY} ${PROJECT_NAME})
|
target_link_libraries(cdutilstest ${PIP_LIBRARY} ${PROJECT_NAME})
|
||||||
message(STATUS "Building ${PROJECT_NAME}")
|
message(STATUS "Building ${PROJECT_NAME}")
|
||||||
if (LIBPROJECT)
|
#if (LIBPROJECT)
|
||||||
include(SDKMacros)
|
# include(SDKMacros)
|
||||||
sdk_install("" "${PROJECT_NAME}" "${HDRS_UTILS}")
|
# sdk_install("" "${PROJECT_NAME}" "${HDRS_UTILS}")
|
||||||
else()
|
#else()
|
||||||
if(LIB)
|
if(LIB)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(CMAKE_INSTALL_PREFIX ${MINGW_DIR})
|
set(CMAKE_INSTALL_PREFIX ${MINGW_DIR})
|
||||||
@@ -52,4 +52,4 @@ else()
|
|||||||
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
#endif()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
project(piqt)
|
project(piqt)
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
cmake_policy(SET CMP0017 OLD)
|
#cmake_policy(SET CMP0017 OLD)
|
||||||
if(NOT LIBPROJECT)
|
if(NOT LIBPROJECT)
|
||||||
find_package(PIP REQUIRED)
|
find_package(PIP REQUIRED)
|
||||||
option(LIB "System install" 0)
|
option(LIB "System install" 0)
|
||||||
@@ -11,36 +11,38 @@ if(NOT LIBPROJECT)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
find_package(QAD REQUIRED)
|
find_package(QAD REQUIRED)
|
||||||
|
list(APPEND QT_MULTILIB_LIST ${PROJECT_NAME})
|
||||||
|
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
||||||
include_directories(${PIP_INCLUDES} ${QAD_INCLUDES})
|
include_directories(${PIP_INCLUDES} ${QAD_INCLUDES})
|
||||||
qt_project(${PROJECT_NAME} H CPP)
|
file(GLOB SRC "*.h" "*.cpp" "*.ui" "*.qrc" "lang/*.ts")
|
||||||
add_library(${PROJECT_NAME} SHARED ${H} ${CPP})
|
find_qt(${QtVersions} Core Gui)
|
||||||
set(LIBS ${PIP_LIBRARY} ${QAD_UTILS_LIBRARY})
|
qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
|
||||||
target_link_libraries(${PROJECT_NAME} ${LIBS})
|
qt_add_library(${PROJECT_NAME} SHARED out_CPP)
|
||||||
|
qt_target_link_libraries(${PROJECT_NAME} pip qad_utils qad_widgets)
|
||||||
message(STATUS "Building ${PROJECT_NAME}")
|
message(STATUS "Building ${PROJECT_NAME}")
|
||||||
if(LIBPROJECT)
|
if(LIBPROJECT)
|
||||||
include(SDKMacros)
|
include(SDKMacros)
|
||||||
sdk_install("pip" "${PROJECT_NAME}" "${H}")
|
sdk_install("pip" "${PROJECT_NAME}" "${out_HDR}")
|
||||||
else()
|
else()
|
||||||
if(LIB)
|
if(LIB)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(CMAKE_INSTALL_PREFIX ${MINGW_DIR})
|
set(CMAKE_INSTALL_PREFIX ${MINGW_DIR})
|
||||||
install(FILES ${H} DESTINATION ${MINGW_INCLUDE}/pip)
|
install(FILES ${out_HDR} DESTINATION ${MINGW_INCLUDE}/pip)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_LIB})
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_LIB})
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
||||||
get_filename_component(QTDIR ${QT_QMAKE_EXECUTABLE} PATH)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION QtBin)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${QTDIR})
|
|
||||||
else()
|
else()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(CMAKE_INSTALL_PREFIX /usr/local)
|
set(CMAKE_INSTALL_PREFIX /usr/local)
|
||||||
else()
|
else()
|
||||||
set(CMAKE_INSTALL_PREFIX /usr)
|
set(CMAKE_INSTALL_PREFIX /usr)
|
||||||
endif()
|
endif()
|
||||||
install(FILES ${H} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/pip)
|
install(FILES ${out_HDR} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/pip)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
project(piqt_utils)
|
project(piqt_utils)
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
cmake_policy(SET CMP0017 OLD)
|
#cmake_policy(SET CMP0017 OLD)
|
||||||
if(LIBPROJECT)
|
if(LIBPROJECT)
|
||||||
include(PIPMacros)
|
include(PIPMacros)
|
||||||
include(SDKMacros)
|
include(SDKMacros)
|
||||||
@@ -13,21 +13,28 @@ else()
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
find_package(QAD REQUIRED)
|
set(LIBTYPE SHARED)
|
||||||
include_directories(${PIP_INCLUDES} ${QAD_INCLUDES})
|
|
||||||
qt_project(${PROJECT_NAME} H CPP)
|
|
||||||
pip_code_model(CCM "../pip/src_main/io/piiodevice.h" "../pip/src_main/io/pipacketextractor.h" OPTIONS "-DPIP_EXPORT" "-Es")
|
|
||||||
if(DEFINED ENV{QNX_HOST})
|
if(DEFINED ENV{QNX_HOST})
|
||||||
add_library(${PROJECT_NAME} STATIC ${H} ${CPP} ${CCM})
|
set(LIBTYPE STATIC)
|
||||||
else()
|
|
||||||
add_library(${PROJECT_NAME} SHARED ${H} ${CPP} ${CCM})
|
|
||||||
endif()
|
endif()
|
||||||
set(LIBS ${QAD_WIDGETS_LIBRARY} ${QAD_UTILS_LIBRARY} ${QAD_BLOCKVIEW_LIBRARY} ${PIP_LIBRARY})
|
find_package(QAD REQUIRED)
|
||||||
target_link_libraries(${PROJECT_NAME} ${LIBS})
|
list(APPEND QT_MULTILIB_LIST ${PROJECT_NAME})
|
||||||
|
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
||||||
|
include_directories(${PIP_INCLUDES} ${QAD_INCLUDES})
|
||||||
|
file(GLOB SRC "*.h" "*.cpp" "*.ui" "*.qrc" "lang/*.ts")
|
||||||
|
pip_code_model(CCM "../pip/src_main/io/piiodevice.h" "../pip/src_main/io/pipacketextractor.h" OPTIONS "-DPIP_EXPORT" "-Es")
|
||||||
|
find_qt(${QtVersions} Core Gui)
|
||||||
|
qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
|
||||||
|
qt_add_library(${PROJECT_NAME} ${LIBTYPE} out_CPP CCM)
|
||||||
|
qt_target_link_libraries(${PROJECT_NAME} pip qad_utils qad_widgets qad_blockview)
|
||||||
message(STATUS "Building ${PROJECT_NAME}")
|
message(STATUS "Building ${PROJECT_NAME}")
|
||||||
|
|
||||||
if (LIBPROJECT)
|
if (LIBPROJECT)
|
||||||
add_dependencies(piqt_utils pip_cmg)
|
foreach(_v ${_QT_VERSIONS_})
|
||||||
|
if (LOCAL_FOUND${_v})
|
||||||
|
add_dependencies(piqt_utils${_v} pip_cmg)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED ENV{QNX_HOST})
|
if (NOT DEFINED ENV{QNX_HOST})
|
||||||
@@ -36,30 +43,28 @@ if (NOT DEFINED ENV{QNX_HOST})
|
|||||||
add_subdirectory(piintrospector)
|
add_subdirectory(piintrospector)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (LIBPROJECT)
|
if(LIBPROJECT)
|
||||||
sdk_install("pip" "${PROJECT_NAME}" "${H}")
|
sdk_install("pip" "${PROJECT_NAME}" "${out_HDR}")
|
||||||
else()
|
else()
|
||||||
if(LIB)
|
if(LIB)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(CMAKE_INSTALL_PREFIX ${MINGW_DIR})
|
set(CMAKE_INSTALL_PREFIX ${MINGW_DIR})
|
||||||
install(FILES ${H} DESTINATION ${MINGW_INCLUDE}/pip)
|
install(FILES ${out_HDR} DESTINATION ${MINGW_INCLUDE}/pip)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_LIB})
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_LIB})
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
||||||
get_filename_component(QTDIR ${QT_QMAKE_EXECUTABLE} PATH)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION QtBin)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${QTDIR})
|
|
||||||
else()
|
else()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(CMAKE_INSTALL_PREFIX /usr/local)
|
set(CMAKE_INSTALL_PREFIX /usr/local)
|
||||||
else()
|
else()
|
||||||
set(CMAKE_INSTALL_PREFIX /usr)
|
set(CMAKE_INSTALL_PREFIX /usr)
|
||||||
install(TARGETS ${_TARGETS} DESTINATION /usr/bin)
|
|
||||||
endif()
|
endif()
|
||||||
install(FILES ${H} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/pip)
|
install(FILES ${out_HDR} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/pip)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
qt_project(piconnedit PICONNEDIT_H PICONNEDIT_CPP)
|
project(piconnedit)
|
||||||
add_executable(${PROJECT_NAME} WIN32 ${PICONNEDIT_H} ${PICONNEDIT_CPP})
|
file(GLOB SRC "*.h" "*.cpp" "*.ui" "*.qrc" "lang/*.ts")
|
||||||
set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QAD_UTILS_LIBRARY} ${QAD_WIDGETS_LIBRARY} piqt_utils)
|
find_qt(${QtVersions} Core Gui)
|
||||||
target_link_libraries(${PROJECT_NAME} ${LIBS})
|
qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
|
||||||
|
qt_add_executable(${PROJECT_NAME} WIN32 out_CPP)
|
||||||
|
qt_target_link_libraries(${PROJECT_NAME} pip qad_utils qad_widgets piqt_utils)
|
||||||
message(STATUS "Building ${PROJECT_NAME}")
|
message(STATUS "Building ${PROJECT_NAME}")
|
||||||
if(LIB)
|
if(LIB)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
||||||
else()
|
else()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/bin)
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
#message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
#message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
qt_project(pidumper PIDUMPER_H PIDUMPER_CPP)
|
project(pidumper)
|
||||||
add_executable(${PROJECT_NAME} WIN32 ${PIDUMPER_H} ${PIDUMPER_CPP})
|
file(GLOB SRC "*.h" "*.cpp" "*.ui" "*.qrc" "lang/*.ts")
|
||||||
set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QAD_UTILS_LIBRARY} ${QAD_WIDGETS_LIBRARY} piqt_utils)
|
find_qt(${QtVersions} Core Gui)
|
||||||
target_link_libraries(${PROJECT_NAME} ${LIBS})
|
qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
|
||||||
|
qt_add_executable(${PROJECT_NAME} WIN32 out_CPP)
|
||||||
|
qt_target_link_libraries(${PROJECT_NAME} pip qad_utils qad_widgets piqt_utils)
|
||||||
message(STATUS "Building ${PROJECT_NAME}")
|
message(STATUS "Building ${PROJECT_NAME}")
|
||||||
if(LIB)
|
if(LIB)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
||||||
else()
|
else()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/bin)
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
#message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
#message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,11 @@
|
|||||||
|
|
||||||
PIDumper::PIDumper(QWidget * parent): QMainWindow(parent) {
|
PIDumper::PIDumper(QWidget * parent): QMainWindow(parent) {
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
|
treeDump->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
|
||||||
|
#else
|
||||||
treeDump->header()->setResizeMode(QHeaderView::ResizeToContents);
|
treeDump->header()->setResizeMode(QHeaderView::ResizeToContents);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
qt_project(piintrospector PIINTROSPECTOR_H PIINTROSPECTOR_CPP)
|
project(piintrospector)
|
||||||
add_executable(${PROJECT_NAME} WIN32 ${PIINTROSPECTOR_H} ${PIINTROSPECTOR_CPP})
|
file(GLOB SRC "*.h" "*.cpp" "*.ui" "*.qrc" "lang/*.ts")
|
||||||
set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QAD_UTILS_LIBRARY} ${QAD_WIDGETS_LIBRARY} piqt_utils)
|
find_qt(${QtVersions} Core Gui)
|
||||||
target_link_libraries(${PROJECT_NAME} ${LIBS})
|
qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
|
||||||
|
qt_add_executable(${PROJECT_NAME} WIN32 out_CPP)
|
||||||
|
qt_target_link_libraries(${PROJECT_NAME} pip qad_utils qad_widgets piqt_utils)
|
||||||
message(STATUS "Building ${PROJECT_NAME}")
|
message(STATUS "Building ${PROJECT_NAME}")
|
||||||
if(LIB)
|
if(LIB)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
||||||
else()
|
else()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/bin)
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
#message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
#message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,11 @@
|
|||||||
|
|
||||||
QPIIntrospector::QPIIntrospector(QWidget * parent): QMainWindow(parent), peer("__introspection_client__") {
|
QPIIntrospector::QPIIntrospector(QWidget * parent): QMainWindow(parent), peer("__introspection_client__") {
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
|
tree->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
|
||||||
|
#else
|
||||||
tree->header()->setResizeMode(QHeaderView::ResizeToContents);
|
tree->header()->setResizeMode(QHeaderView::ResizeToContents);
|
||||||
|
#endif
|
||||||
CONNECTU(&peer, dataReceivedEvent, this, peerReceived)
|
CONNECTU(&peer, dataReceivedEvent, this, peerReceived)
|
||||||
startTimer(100);
|
startTimer(100);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,6 @@
|
|||||||
#include "piqt_highlighter.h"
|
#include "piqt_highlighter.h"
|
||||||
#include "piqt.h"
|
#include "piqt.h"
|
||||||
#include "picodeinfo.h"
|
#include "picodeinfo.h"
|
||||||
#include <QSqlQuery>
|
|
||||||
#include <QSqlError>
|
|
||||||
#include <QSqlRecord>
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
project(qad)
|
project(qad)
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
cmake_policy(SET CMP0017 OLD)
|
#cmake_policy(SET CMP0017 OLD)
|
||||||
find_package(Qt4 REQUIRED)
|
#find_package(Qt4 REQUIRED)
|
||||||
include(QtProject.cmake)
|
|
||||||
if (LIBPROJECT)
|
if (LIBPROJECT)
|
||||||
include(../SDKMacros.cmake)
|
include(../SDKMacros.cmake)
|
||||||
else()
|
else()
|
||||||
@@ -35,7 +34,7 @@ if (NOT LIBPROJECT)
|
|||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
set(CMAKES "FindQAD.cmake" "QtProject.cmake")
|
set(CMAKES "FindQAD.cmake" "QtWraps.cmake")
|
||||||
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
|
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
|
||||||
|
|
||||||
macro(qad_install _TARGET _H_FILES)
|
macro(qad_install _TARGET _H_FILES)
|
||||||
@@ -48,45 +47,46 @@ macro(qad_install _TARGET _H_FILES)
|
|||||||
#message("HFILES ${_H_FILES}")
|
#message("HFILES ${_H_FILES}")
|
||||||
install(FILES ${_H_FILES} DESTINATION ${MINGW_INCLUDE}/qad)
|
install(FILES ${_H_FILES} DESTINATION ${MINGW_INCLUDE}/qad)
|
||||||
endif()
|
endif()
|
||||||
install(TARGETS ${_TARGET} DESTINATION ${MINGW_LIB})
|
qt_install(TARGETS ${_TARGET} DESTINATION ${MINGW_LIB})
|
||||||
install(TARGETS ${_TARGET} DESTINATION ${MINGW_BIN})
|
qt_install(TARGETS ${_TARGET} DESTINATION ${MINGW_BIN})
|
||||||
get_filename_component(QTDIR ${QT_QMAKE_EXECUTABLE} PATH)
|
qt_install(TARGETS ${_TARGET} DESTINATION QtBin)
|
||||||
install(TARGETS ${_TARGET} DESTINATION ${QTDIR})
|
|
||||||
else()
|
else()
|
||||||
if(NOT _H_FILES STREQUAL "")
|
if(NOT _H_FILES STREQUAL "")
|
||||||
install(FILES ${_H_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/qad)
|
install(FILES ${_H_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/qad)
|
||||||
endif()
|
endif()
|
||||||
install(TARGETS ${_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
qt_install(TARGETS ${_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${_TARGET} DESTINATION bin)
|
qt_install(TARGETS ${_TARGET} DESTINATION bin)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(qad_plugin NAME _LIBS)
|
macro(qad_plugin NAME _MODULES _LIBS)
|
||||||
project(qad_${NAME}_plugin)
|
set(PROJ_NAME qad_${NAME}_plugin)
|
||||||
include_directories("..")
|
include_directories("..")
|
||||||
set(LIBS ${_${NAME}_PLUGIN_LIBS} qad_${NAME} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTDESIGNER_LIBRARY} "${_LIBS}")
|
|
||||||
#message(${_${NAME}_PLUGIN_LIBS})
|
#message(${_${NAME}_PLUGIN_LIBS})
|
||||||
add_definitions(-DQT_PLUGIN)
|
add_definitions(-DQT_PLUGIN)
|
||||||
add_definitions(-DQT_NO_DEBUG)
|
add_definitions(-DQT_NO_DEBUG)
|
||||||
add_definitions(-DQT_SHARED)
|
add_definitions(-DQT_SHARED)
|
||||||
add_definitions(-DQDESIGNER_EXPORT_WIDGETS)
|
add_definitions(-DQDESIGNER_EXPORT_WIDGETS)
|
||||||
file(GLOB PMOCS "./*.h")
|
file(GLOB SRC "*.h" "*.cpp" "*.ui" "*.qrc" "lang/*.ts")
|
||||||
file(GLOB PCPPS "./*.cpp")
|
find_qt(${QtVersions} Core Designer ${_MODULES})
|
||||||
qt4_wrap_cpp(PCMOCS ${PMOCS} OPTIONS -nw)
|
qt_wrap(${SRC} CPPS out_CPP QMS out_QM)
|
||||||
add_library(${PROJECT_NAME} SHARED ${PCMOCS} ${PCPPS} ${PMOCS})
|
qt_add_library(${PROJ_NAME} SHARED out_CPP)
|
||||||
target_link_libraries(${PROJECT_NAME} ${LIBS})
|
qt_target_link_libraries(${PROJ_NAME} ${_LIBS} qad_${NAME} ${_${NAME}_PLUGIN_LIBS})
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${QT_PLUGINS_DIR}/designer)
|
qt_install(TARGETS ${PROJ_NAME} DESTINATION QtPlugins/designer)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(qad_project NAME _LIBS)
|
macro(qad_project NAME _MODULES _LIBS)
|
||||||
qt_project(qad_${NAME} _H _CPP)
|
set(PROJ_NAME qad_${NAME})
|
||||||
add_library(qad_${NAME} SHARED ${_H} ${_CPP})
|
file(GLOB SRC "*.h" "*.cpp" "*.ui" "*.qrc" "lang/*.ts")
|
||||||
target_link_libraries(qad_${NAME} ${_LIBS})
|
find_qt(${QtVersions} Core ${_MODULES})
|
||||||
message(STATUS "Building ${PROJECT_NAME}")
|
qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
|
||||||
qad_install(${PROJECT_NAME} "${_H}")
|
qt_add_library(${PROJ_NAME} SHARED out_CPP)
|
||||||
|
qt_target_link_libraries(${PROJ_NAME} ${_LIBS})
|
||||||
|
qad_install(${PROJ_NAME} "${out_HDR}")
|
||||||
|
message(STATUS "Building ${PROJ_NAME}")
|
||||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugin")
|
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugin")
|
||||||
set(_${NAME}_PLUGIN_LIBS "${_LIBS}")
|
set(_${NAME}_PLUGIN_LIBS "${_LIBS}")
|
||||||
add_subdirectory(plugin)
|
add_subdirectory(plugin)
|
||||||
@@ -94,6 +94,10 @@ macro(qad_project NAME _LIBS)
|
|||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
set(DIRS utils widgets application blockview graphic sql_table touch_widgets)
|
set(DIRS utils widgets application blockview graphic sql_table touch_widgets)
|
||||||
|
foreach(D ${DIRS})
|
||||||
|
list(APPEND QT_MULTILIB_LIST qad_${D})
|
||||||
|
endforeach(D)
|
||||||
|
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
||||||
foreach(D ${DIRS})
|
foreach(D ${DIRS})
|
||||||
include_directories(${D})
|
include_directories(${D})
|
||||||
add_subdirectory(${D})
|
add_subdirectory(${D})
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
if(NOT LIBPROJECT)
|
if(NOT LIBPROJECT)
|
||||||
include(QtProject)
|
include(QtWraps)
|
||||||
endif()
|
endif()
|
||||||
set(_SEARCH_DIR)
|
set(_SEARCH_DIR)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
@@ -24,10 +24,15 @@ foreach(_Q ${_QAD_LIBS})
|
|||||||
set(QAD_${_QU}_LIBRARY qad_${_Q})
|
set(QAD_${_QU}_LIBRARY qad_${_Q})
|
||||||
list(APPEND QAD_INCLUDES ${QAD_DIR}/${_Q})
|
list(APPEND QAD_INCLUDES ${QAD_DIR}/${_Q})
|
||||||
else()
|
else()
|
||||||
find_library(QAD_${_QU}_LIBRARY qad_${_Q} ${_SEARCH_DIR})
|
foreach(_v ${_QT_VERSIONS_})
|
||||||
|
find_library(QAD${_v}_${_QU}_LIBRARY qad_${_Q}${_v} ${_SEARCH_DIR})
|
||||||
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
#message(STATUS "Library ${_Q} (${_QU}) -> ${QAD_${_QU}_LIBRARY} found in ${_SEARCH_DIR}")
|
#message(STATUS "Library ${_Q} (${_QU}) -> ${QAD_${_QU}_LIBRARY} found in ${_SEARCH_DIR}")
|
||||||
endforeach()
|
endforeach()
|
||||||
if(NOT LIBPROJECT)
|
if(NOT LIBPROJECT)
|
||||||
message(STATUS "Found QAD")
|
if (NOT _QAD_MSG)
|
||||||
|
set(_QAD_MSG 1 CACHE BOOL "msg_qad" FORCE)
|
||||||
|
message(STATUS "Found QAD")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
macro(qt_project NAME _H_OUT _CPP_OUT)
|
|
||||||
project(${NAME})
|
|
||||||
find_package(Qt4 REQUIRED)
|
|
||||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${QT_INCLUDES})
|
|
||||||
file(GLOB ${_H_OUT} "./*.h")
|
|
||||||
file(GLOB CPPS_${NAME} "./*.cpp")
|
|
||||||
file(GLOB UIS_${NAME} "./*.ui")
|
|
||||||
file(GLOB RES_${NAME} "./*.qrc")
|
|
||||||
qt4_wrap_ui(CUIS_${NAME} ${UIS_${NAME}})
|
|
||||||
qt4_wrap_cpp(CMOCS_${NAME} ${${_H_OUT}} OPTIONS -nw)
|
|
||||||
qt4_add_resources(CRES_${NAME} ${RES_${NAME}})
|
|
||||||
set(${_CPP_OUT} ${CPPS_${NAME}})
|
|
||||||
list(APPEND ${_CPP_OUT} ${CUIS_${NAME}})
|
|
||||||
list(APPEND ${_CPP_OUT} ${CMOCS_${NAME}})
|
|
||||||
list(APPEND ${_CPP_OUT} ${CRES_${NAME}})
|
|
||||||
endmacro()
|
|
||||||
@@ -1,2 +1 @@
|
|||||||
set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} qad_widgets)
|
qad_project(application "Gui;Widgets" "qad_widgets")
|
||||||
qad_project(application "${LIBS}")
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
qad_plugin(application "")
|
qad_plugin(application "Gui;Widgets" "")
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef EDOCKWIDGETPLUGIN_H
|
#ifndef EDOCKWIDGETPLUGIN_H
|
||||||
#define EDOCKWIDGETPLUGIN_H
|
#define EDOCKWIDGETPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class EDockWidgetPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class EDockWidgetPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef EMAINWINDOWPLUGIN_H
|
#ifndef EMAINWINDOWPLUGIN_H
|
||||||
#define EMAINWINDOWPLUGIN_H
|
#define EMAINWINDOWPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class EMainWindowPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class EMainWindowPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef HISTORYVIEWPLUGIN_H
|
#ifndef HISTORYVIEWPLUGIN_H
|
||||||
#define HISTORYVIEWPLUGIN_H
|
#define HISTORYVIEWPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class HistoryViewPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class HistoryViewPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
#include "qad_application.h"
|
||||||
#include "edockwidgetplugin.h"
|
#include "edockwidgetplugin.h"
|
||||||
#include "emainwindowplugin.h"
|
#include "emainwindowplugin.h"
|
||||||
#include "historyviewplugin.h"
|
#include "historyviewplugin.h"
|
||||||
#include "qad_application.h"
|
|
||||||
|
|
||||||
|
|
||||||
QADApplication::QADApplication(QObject * parent): QObject(parent) {
|
QADApplication::QADApplication(QObject * parent): QObject(parent) {
|
||||||
@@ -16,4 +16,6 @@ QList<QDesignerCustomWidgetInterface * > QADApplication::customWidgets() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if QT_VERSION < 0x050000
|
||||||
Q_EXPORT_PLUGIN2(qad_graphic_plugin, QADApplication)
|
Q_EXPORT_PLUGIN2(qad_graphic_plugin, QADApplication)
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ class QADApplication: public QObject, public QDesignerCustomWidgetCollectionInte
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
|
Q_PLUGIN_METADATA(IID "qad.application")
|
||||||
|
#endif
|
||||||
public:
|
public:
|
||||||
explicit QADApplication(QObject * parent = 0);
|
explicit QADApplication(QObject * parent = 0);
|
||||||
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
|
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} qad_widgets qad_utils)
|
qad_project(blockview "Gui;Widgets" "qad_utils;qad_widgets")
|
||||||
qad_project(blockview "${LIBS}")
|
|
||||||
add_subdirectory(blockeditor)
|
add_subdirectory(blockeditor)
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
class BlockBusItem: public QGraphicsObject, public PropertyStorage {
|
class BlockBusItem: public QGraphicsObject, public PropertyStorage {
|
||||||
//Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(QGraphicsItem)
|
Q_INTERFACES(QGraphicsItem)
|
||||||
//Q_PROPERTY(double width READ width WRITE setWidth)
|
//Q_PROPERTY(double width READ width WRITE setWidth)
|
||||||
friend class BlockView;
|
friend class BlockView;
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
qt_project(blockeditor BLOCKEDITOR_H BLOCKEDITOR_H)
|
project(blockeditor)
|
||||||
add_executable(${PROJECT_NAME} WIN32 ${BLOCKEDITOR_H} ${BLOCKEDITOR_H})
|
file(GLOB SRC "*.h" "*.cpp" "*.ui" "*.qrc" "lang/*.ts")
|
||||||
set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} qad_widgets qad_utils qad_blockview)
|
find_qt(${QtVersions} Core Gui Widgets)
|
||||||
target_link_libraries(${PROJECT_NAME} ${LIBS})
|
qt_wrap(${SRC} CPPS out_CPP QMS out_QM)
|
||||||
|
qt_add_executable(${PROJECT_NAME} WIN32 out_CPP)
|
||||||
|
qt_target_link_libraries(${PROJECT_NAME} qad_utils qad_widgets qad_blockview)
|
||||||
message(STATUS "Building ${PROJECT_NAME}")
|
message(STATUS "Building ${PROJECT_NAME}")
|
||||||
if(LIB)
|
if(LIB)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
||||||
else()
|
else()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/bin)
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
#message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
#message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
#include <QVector2D>
|
#include <QVector2D>
|
||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
|
#include <QMimeData>
|
||||||
|
|
||||||
const QString _BlockView_Mime_ = "_BlockView_copypaste_";
|
const QString _BlockView_Mime_ = "_BlockView_copypaste_";
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
qad_plugin(blockview "")
|
qad_plugin(blockview "Gui;Widgets" "")
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef BLOCKVIEWPLUGIN_H
|
#ifndef BLOCKVIEWPLUGIN_H
|
||||||
#define BLOCKVIEWPLUGIN_H
|
#define BLOCKVIEWPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class BlockViewPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class BlockViewPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "blockviewplugin.h"
|
|
||||||
#include "qad_blockview.h"
|
#include "qad_blockview.h"
|
||||||
|
#include "blockviewplugin.h"
|
||||||
|
|
||||||
QADBlockView::QADBlockView(QObject * parent): QObject(parent)
|
QADBlockView::QADBlockView(QObject * parent): QObject(parent)
|
||||||
{
|
{
|
||||||
@@ -11,4 +11,7 @@ QList<QDesignerCustomWidgetInterface * > QADBlockView::customWidgets() const {
|
|||||||
return m_widgets;
|
return m_widgets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if QT_VERSION < 0x050000
|
||||||
Q_EXPORT_PLUGIN2(qad_graphic_plugin, QADBlockView)
|
Q_EXPORT_PLUGIN2(qad_graphic_plugin, QADBlockView)
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ class QADBlockView: public QObject, public QDesignerCustomWidgetCollectionInterf
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
|
Q_PLUGIN_METADATA(IID "qad.blockview")
|
||||||
|
#endif
|
||||||
public:
|
public:
|
||||||
explicit QADBlockView(QObject * parent = 0);
|
explicit QADBlockView(QObject * parent = 0);
|
||||||
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
|
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${OPENGL_LIBRARIES} qad_widgets qad_utils)
|
qad_project(graphic "Gui;Widgets;OpenGL" "qad_widgets;qad_utils;${OPENGL_LIBRARIES}")
|
||||||
qad_project(graphic "${LIBS}")
|
|
||||||
add_subdirectory(qpicalculator)
|
add_subdirectory(qpicalculator)
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#include "ui_graphic.h"
|
#include "ui_graphic.h"
|
||||||
#include "ui_graphic_conf.h"
|
#include "ui_graphic_conf.h"
|
||||||
#if QT_VERSION >= 0x050100
|
#if QT_VERSION >= 0x050100
|
||||||
# include <QSensorGestureManager>
|
//# include <QSensorGestureManager>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
qad_plugin(graphic "")
|
qad_plugin(graphic "Gui;Widgets;OpenGL" "")
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef GRAPHICPLUGIN_H
|
#ifndef GRAPHICPLUGIN_H
|
||||||
#define GRAPHICPLUGIN_H
|
#define GRAPHICPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class GraphicPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class GraphicPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "graphicplugin.h"
|
|
||||||
#include "qad_graphic.h"
|
#include "qad_graphic.h"
|
||||||
|
#include "graphicplugin.h"
|
||||||
|
|
||||||
QADGraphic::QADGraphic(QObject * parent): QObject(parent)
|
QADGraphic::QADGraphic(QObject * parent): QObject(parent)
|
||||||
{
|
{
|
||||||
@@ -11,4 +11,7 @@ QList<QDesignerCustomWidgetInterface * > QADGraphic::customWidgets() const {
|
|||||||
return m_widgets;
|
return m_widgets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if QT_VERSION < 0x050000
|
||||||
Q_EXPORT_PLUGIN2(qad_graphic_plugin, QADGraphic)
|
Q_EXPORT_PLUGIN2(qad_graphic_plugin, QADGraphic)
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ class QADGraphic: public QObject, public QDesignerCustomWidgetCollectionInterfac
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
|
Q_PLUGIN_METADATA(IID "qad.graphic")
|
||||||
|
#endif
|
||||||
public:
|
public:
|
||||||
explicit QADGraphic(QObject * parent = 0);
|
explicit QADGraphic(QObject * parent = 0);
|
||||||
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
|
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
|
||||||
|
|||||||
@@ -1,21 +1,23 @@
|
|||||||
qt_project(qpicalc QPICALC_H QPICALC_H)
|
project(qpicalc)
|
||||||
add_executable(${PROJECT_NAME} WIN32 ${QPICALC_H} ${QPICALC_H})
|
file(GLOB SRC "*.h" "*.cpp" "*.ui" "*.qrc" "lang/*.ts")
|
||||||
set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} qad_widgets qad_utils qad_graphic)
|
find_qt(${QtVersions} Core Gui Widgets)
|
||||||
target_link_libraries(${PROJECT_NAME} ${LIBS})
|
qt_wrap(${SRC} CPPS out_CPP QMS out_QM)
|
||||||
|
qt_add_executable(${PROJECT_NAME} WIN32 out_CPP)
|
||||||
|
qt_target_link_libraries(${PROJECT_NAME} qad_utils qad_widgets qad_graphic)
|
||||||
message(STATUS "Building ${PROJECT_NAME}")
|
message(STATUS "Building ${PROJECT_NAME}")
|
||||||
if(LIB)
|
if(LIB)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
||||||
else()
|
else()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/bin)
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
#message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
#message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#include <QtGui/QApplication>
|
#include <QApplication>
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
int main(int argc, char *argv[]) {
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
MainWindow w;
|
MainWindow w;
|
||||||
w.show();
|
w.show();
|
||||||
return a.exec();
|
return a.exec();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,13 @@ MainWindow::MainWindow(QWidget * parent): QMainWindow(parent), Ui::MainWindow()
|
|||||||
setupUi(this);
|
setupUi(this);
|
||||||
active_ = false;
|
active_ = false;
|
||||||
lineInput->setFocus();
|
lineInput->setFocus();
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
|
treeGraphics->header()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
|
treeGraphics->header()->setSectionResizeMode(1, QHeaderView::ResizeToContents);
|
||||||
|
#else
|
||||||
treeGraphics->header()->setResizeMode(0, QHeaderView::ResizeToContents);
|
treeGraphics->header()->setResizeMode(0, QHeaderView::ResizeToContents);
|
||||||
treeGraphics->header()->setResizeMode(1, QHeaderView::ResizeToContents);
|
treeGraphics->header()->setResizeMode(1, QHeaderView::ResizeToContents);
|
||||||
|
#endif
|
||||||
npal = epal = lineInput->palette();
|
npal = epal = lineInput->palette();
|
||||||
epal.setColor(lineInput->backgroundRole(), QColor(Qt::red).lighter(150));
|
epal.setColor(lineInput->backgroundRole(), QColor(Qt::red).lighter(150));
|
||||||
connect(&session, SIGNAL(loading(QPIConfig & )), this, SLOT(loading(QPIConfig & )));
|
connect(&session, SIGNAL(loading(QPIConfig & )), this, SLOT(loading(QPIConfig & )));
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTSQL_LIBRARY} qad_widgets qad_utils)
|
qad_project(sql_table "Gui;Widgets;Sql" "qad_utils;qad_widgets")
|
||||||
qad_project(sql_table "${LIBS}")
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
qad_plugin(sql_table "")
|
qad_plugin(sql_table "Gui;Widgets;Sql" "")
|
||||||
|
|||||||
@@ -14,4 +14,6 @@ QList<QDesignerCustomWidgetInterface * > QADSQLTable::customWidgets() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if QT_VERSION < 0x050000
|
||||||
Q_EXPORT_PLUGIN2(qad_sql_table_plugin, QADSQLTable)
|
Q_EXPORT_PLUGIN2(qad_sql_table_plugin, QADSQLTable)
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ class QADSQLTable: public QObject, public QDesignerCustomWidgetCollectionInterfa
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
|
Q_PLUGIN_METADATA(IID "qad.sql_table")
|
||||||
|
#endif
|
||||||
public:
|
public:
|
||||||
explicit QADSQLTable(QObject * parent = 0);
|
explicit QADSQLTable(QObject * parent = 0);
|
||||||
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
|
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef SQLRECORDPLUGIN_H
|
#ifndef SQLRECORDPLUGIN_H
|
||||||
#define SQLRECORDPLUGIN_H
|
#define SQLRECORDPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class SQLRecordPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class SQLRecordPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef SQLTABLEPLUGIN_H
|
#ifndef SQLTABLEPLUGIN_H
|
||||||
#define SQLTABLEPLUGIN_H
|
#define SQLTABLEPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class SQLTablePlugin: public QObject, public QDesignerCustomWidgetInterface
|
class SQLTablePlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
|
qad_project(touch_widgets "Gui;Widgets" "")
|
||||||
qad_project(touch_widgets "${LIBS}")
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
qad_plugin(touch_widgets "")
|
qad_plugin(touch_widgets "Gui;Widgets" "")
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
#include "touch_widgets.h"
|
||||||
#include "touchsliderplugin.h"
|
#include "touchsliderplugin.h"
|
||||||
#include "touchbuttframeplugin.h"
|
#include "touchbuttframeplugin.h"
|
||||||
#include "touchbuttonplugin.h"
|
#include "touchbuttonplugin.h"
|
||||||
#include "touch_widgets.h"
|
|
||||||
|
|
||||||
TW::TW(QObject *parent)
|
TW::TW(QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
@@ -16,4 +16,7 @@ QList<QDesignerCustomWidgetInterface*> TW::customWidgets() const
|
|||||||
return m_widgets;
|
return m_widgets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if QT_VERSION < 0x050000
|
||||||
Q_EXPORT_PLUGIN2(twplugin, TW)
|
Q_EXPORT_PLUGIN2(twplugin, TW)
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ class TW : public QObject, public QDesignerCustomWidgetCollectionInterface
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
|
Q_PLUGIN_METADATA(IID "qad.touch_widgets")
|
||||||
|
#endif
|
||||||
public:
|
public:
|
||||||
explicit TW(QObject *parent = 0);
|
explicit TW(QObject *parent = 0);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef TOUCHBUTTFRAMEPLUGIN_H
|
#ifndef TOUCHBUTTFRAMEPLUGIN_H
|
||||||
#define TOUCHBUTTFRAMEPLUGIN_H
|
#define TOUCHBUTTFRAMEPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class TouchButtFramePlugin : public QObject, public QDesignerCustomWidgetInterface
|
class TouchButtFramePlugin : public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef TOUCHBUTTONPLUGIN_H
|
#ifndef TOUCHBUTTONPLUGIN_H
|
||||||
#define TOUCHBUTTONPLUGIN_H
|
#define TOUCHBUTTONPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class TouchButtonPlugin : public QObject, public QDesignerCustomWidgetInterface
|
class TouchButtonPlugin : public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef TOUCHSLIDERPLUGIN_H
|
#ifndef TOUCHSLIDERPLUGIN_H
|
||||||
#define TOUCHSLIDERPLUGIN_H
|
#define TOUCHSLIDERPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class TouchSliderPlugin : public QObject, public QDesignerCustomWidgetInterface
|
class TouchSliderPlugin : public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef TOUCHBUTTFRAME_H
|
#ifndef TOUCHBUTTFRAME_H
|
||||||
#define TOUCHBUTTFRAME_H
|
#define TOUCHBUTTFRAME_H
|
||||||
|
|
||||||
#include <QtGui/QFrame>
|
#include <QFrame>
|
||||||
#include <QBoxLayout>
|
#include <QBoxLayout>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include "touchbutton.h"
|
#include "touchbutton.h"
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
|
qad_project(utils "Gui" "")
|
||||||
qad_project(utils "${LIBS}")
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
qad_plugin(utils "")
|
qad_plugin(utils "Gui" "")
|
||||||
|
|||||||
@@ -10,4 +10,7 @@ QList<QDesignerCustomWidgetInterface * > QADUtils::customWidgets() const {
|
|||||||
return m_widgets;
|
return m_widgets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if QT_VERSION < 0x050000
|
||||||
Q_EXPORT_PLUGIN2(qad_utils_plugin, QADUtils)
|
Q_EXPORT_PLUGIN2(qad_utils_plugin, QADUtils)
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -7,8 +7,11 @@
|
|||||||
class QADUtils: public QObject, public QDesignerCustomWidgetCollectionInterface
|
class QADUtils: public QObject, public QDesignerCustomWidgetCollectionInterface
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
//Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface")
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
|
Q_PLUGIN_METADATA(IID "qad.utils")
|
||||||
|
#endif
|
||||||
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit QADUtils(QObject * parent = 0);
|
explicit QADUtils(QObject * parent = 0);
|
||||||
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
|
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} qad_utils)
|
qad_project(widgets "Gui;Widgets" "qad_utils")
|
||||||
qad_project(widgets "${LIBS}")
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
qad_plugin(widgets "")
|
qad_plugin(widgets "Gui;Widgets" "")
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef CHARDIALOGPLUGIN_H
|
#ifndef CHARDIALOGPLUGIN_H
|
||||||
#define CHARDIALOGPLUGIN_H
|
#define CHARDIALOGPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class CharDialogPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class CharDialogPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef CLINEEDITPLUGIN_H
|
#ifndef CLINEEDITPLUGIN_H
|
||||||
#define CLINEEDITPLUGIN_H
|
#define CLINEEDITPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class CLineEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class CLineEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef COLORBUTTONPLUGIN_H
|
#ifndef COLORBUTTONPLUGIN_H
|
||||||
#define COLORBUTTONPLUGIN_H
|
#define COLORBUTTONPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class ColorButtonPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class ColorButtonPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef ECOMBOBOXPLUGIN_H
|
#ifndef ECOMBOBOXPLUGIN_H
|
||||||
#define ECOMBOBOXPLUGIN_H
|
#define ECOMBOBOXPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class EComboBoxPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class EComboBoxPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef ICONEDLABEPLUGIN_H
|
#ifndef ICONEDLABEPLUGIN_H
|
||||||
#define ICONEDLABEPLUGIN_H
|
#define ICONEDLABEPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class IconedLabelPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class IconedLabelPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#include "qad_widgets.h"
|
||||||
#include "spinsliderplugin.h"
|
#include "spinsliderplugin.h"
|
||||||
#include "colorbuttonplugin.h"
|
#include "colorbuttonplugin.h"
|
||||||
#include "chardialogplugin.h"
|
#include "chardialogplugin.h"
|
||||||
@@ -12,7 +13,6 @@
|
|||||||
#include "qcodeeditplugin.h"
|
#include "qcodeeditplugin.h"
|
||||||
#include "qvarianteditplugin.h"
|
#include "qvarianteditplugin.h"
|
||||||
#include "qpiconfigplugin.h"
|
#include "qpiconfigplugin.h"
|
||||||
#include "qad_widgets.h"
|
|
||||||
|
|
||||||
QADWidgets::QADWidgets(QObject * parent): QObject(parent)
|
QADWidgets::QADWidgets(QObject * parent): QObject(parent)
|
||||||
{
|
{
|
||||||
@@ -37,4 +37,7 @@ QList<QDesignerCustomWidgetInterface * > QADWidgets::customWidgets() const {
|
|||||||
return m_widgets;
|
return m_widgets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if QT_VERSION < 0x050000
|
||||||
Q_EXPORT_PLUGIN2(qad_widgets_plugin, QADWidgets)
|
Q_EXPORT_PLUGIN2(qad_widgets_plugin, QADWidgets)
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ class QADWidgets: public QObject, public QDesignerCustomWidgetCollectionInterfac
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
|
Q_PLUGIN_METADATA(IID "qad.widgets")
|
||||||
|
#endif
|
||||||
public:
|
public:
|
||||||
explicit QADWidgets(QObject * parent = 0);
|
explicit QADWidgets(QObject * parent = 0);
|
||||||
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
|
virtual QList<QDesignerCustomWidgetInterface * > customWidgets() const;
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef QCODEEDITPLUGIN_H
|
#ifndef QCODEEDITPLUGIN_H
|
||||||
#define QCODEEDITPLUGIN_H
|
#define QCODEEDITPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class QCodeEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class QCodeEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef QIPEDITPLUGIN_H
|
#ifndef QIPEDITPLUGIN_H
|
||||||
#define QIPEDITPLUGIN_H
|
#define QIPEDITPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class QIPEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class QIPEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef QPICONFIGPLUGIN_H
|
#ifndef QPICONFIGPLUGIN_H
|
||||||
#define QPICONFIGPLUGIN_H
|
#define QPICONFIGPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class QPIConfigPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class QPIConfigPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef QPICONSOLEPLUGIN_H
|
#ifndef QPICONSOLEPLUGIN_H
|
||||||
#define QPICONSOLEPLUGIN_H
|
#define QPICONSOLEPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class QPIConsolePlugin: public QObject, public QDesignerCustomWidgetInterface
|
class QPIConsolePlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef QPOINTEDITPLUGIN_H
|
#ifndef QPOINTEDITPLUGIN_H
|
||||||
#define QPOINTEDITPLUGIN_H
|
#define QPOINTEDITPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class QPointEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class QPointEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef QRECTEDITPLUGIN_H
|
#ifndef QRECTEDITPLUGIN_H
|
||||||
#define QRECTEDITPLUGIN_H
|
#define QRECTEDITPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class QRectEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class QRectEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef QVARIANTEDITPLUGIN_H
|
#ifndef QVARIANTEDITPLUGIN_H
|
||||||
#define QVARIANTEDITPLUGIN_H
|
#define QVARIANTEDITPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class QVariantEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class QVariantEditPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef SHORTCUTSPLUGIN_H
|
#ifndef SHORTCUTSPLUGIN_H
|
||||||
#define SHORTCUTSPLUGIN_H
|
#define SHORTCUTSPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class ShortcutsPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class ShortcutsPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
#ifndef SPINSLIDERPLUGIN_H
|
#ifndef SPINSLIDERPLUGIN_H
|
||||||
#define SPINSLIDERPLUGIN_H
|
#define SPINSLIDERPLUGIN_H
|
||||||
|
|
||||||
#include <QDesignerCustomWidgetInterface>
|
#if QT_VERSION >= 0x050000
|
||||||
|
# include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||||
|
#else
|
||||||
|
# include <QDesignerCustomWidgetInterface>
|
||||||
|
#endif
|
||||||
|
|
||||||
class SpinSliderPlugin: public QObject, public QDesignerCustomWidgetInterface
|
class SpinSliderPlugin: public QObject, public QDesignerCustomWidgetInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
project(qcd_utils)
|
project(qcd_utils)
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
cmake_policy(SET CMP0017 OLD)
|
#cmake_policy(SET CMP0017 OLD)
|
||||||
if (NOT LIBPROJECT)
|
if (NOT LIBPROJECT)
|
||||||
find_package(PIP REQUIRED)
|
find_package(PIP REQUIRED)
|
||||||
option(LIB "System install" 0)
|
option(LIB "System install" 0)
|
||||||
@@ -11,35 +11,37 @@ if (NOT LIBPROJECT)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
find_package(QAD REQUIRED)
|
find_package(QAD REQUIRED)
|
||||||
|
list(APPEND QT_MULTILIB_LIST ${PROJECT_NAME})
|
||||||
|
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
||||||
include_directories(${PIP_INCLUDES} ${QAD_INCLUDES})
|
include_directories(${PIP_INCLUDES} ${QAD_INCLUDES})
|
||||||
qt_project(${PROJECT_NAME} H CPP)
|
file(GLOB SRC "*.h" "*.cpp" "*.ui" "*.qrc" "lang/*.ts")
|
||||||
add_library(${PROJECT_NAME} SHARED ${H} ${CPP})
|
find_qt(${QtVersions} Core Gui)
|
||||||
set(LIBS ${PIP_LIBRARY} ${QAD_UTILS_LIBRARY} ${QAD_WIDGETS_LIBRARY} cd_utils piqt)
|
qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
|
||||||
target_link_libraries(${PROJECT_NAME} ${LIBS})
|
qt_add_library(${PROJECT_NAME} SHARED out_CPP)
|
||||||
|
qt_target_link_libraries(${PROJECT_NAME} pip qad_utils qad_widgets cd_utils piqt)
|
||||||
message(STATUS "Building ${PROJECT_NAME}")
|
message(STATUS "Building ${PROJECT_NAME}")
|
||||||
if (LIBPROJECT)
|
if(LIBPROJECT)
|
||||||
sdk_install("" ${PROJECT_NAME} "${H}")
|
sdk_install("" "${PROJECT_NAME}" "${out_HDR}")
|
||||||
else()
|
else()
|
||||||
if(LIB)
|
if(LIB)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(CMAKE_INSTALL_PREFIX ${MINGW_DIR})
|
set(CMAKE_INSTALL_PREFIX ${MINGW_DIR})
|
||||||
install(FILES ${H} DESTINATION ${MINGW_INCLUDE}/pip)
|
install(FILES ${out_HDR} DESTINATION ${MINGW_INCLUDE})
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_LIB})
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_LIB})
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
||||||
get_filename_component(QTDIR ${QT_QMAKE_EXECUTABLE} PATH)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION QtBin)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${QTDIR})
|
|
||||||
else()
|
else()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(CMAKE_INSTALL_PREFIX /usr/local)
|
set(CMAKE_INSTALL_PREFIX /usr/local)
|
||||||
else()
|
else()
|
||||||
set(CMAKE_INSTALL_PREFIX /usr)
|
set(CMAKE_INSTALL_PREFIX /usr)
|
||||||
endif()
|
endif()
|
||||||
install(FILES ${H} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/pip)
|
install(FILES ${out_HDR} DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,21 +1,22 @@
|
|||||||
qt_project(cd_pult PULT_H PULT_CPP)
|
project(cd_pult)
|
||||||
add_executable(${PROJECT_NAME} WIN32 ${PULT_H} ${PULT_CPP})
|
file(GLOB SRC "*.h" "*.cpp" "*.ui" "*.qrc" "lang/*.ts")
|
||||||
set(LIBS ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QAD_GRAPHIC_LIBRARY} ${QAD_UTILS_LIBRARY} ${QAD_WIDGETS_LIBRARY} qcd_utils)
|
find_qt(${QtVersions} Core Gui)
|
||||||
target_link_libraries(${PROJECT_NAME} ${LIBS})
|
qt_wrap(${SRC} HDRS out_HDR CPPS out_CPP QMS out_QM)
|
||||||
|
qt_add_executable(${PROJECT_NAME} WIN32 out_CPP)
|
||||||
|
qt_target_link_libraries(${PROJECT_NAME} qad_utils qad_widgets qad_graphic qcd_utils)
|
||||||
message(STATUS "Building ${PROJECT_NAME}")
|
message(STATUS "Building ${PROJECT_NAME}")
|
||||||
if(LIB)
|
if(LIB)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION ${MINGW_BIN})
|
||||||
else()
|
else()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION /usr/local/bin)
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION /usr/bin)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
#message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
qt_install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
#message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include <QtGui/QApplication>
|
#include <QApplication>
|
||||||
#include "form.h"
|
#include "form.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user