Qt5 compile settings for crash report tool

--HG--
branch : feature-crashreport+qt5
hg/feature/qt5
kaetemi 10 years ago
parent 46c4bf1c24
commit c5ec0a9223

@ -3,8 +3,10 @@ SUBDIRS(bnp_make disp_sheet_id extract_filename lock make_sheet_id xml_packer)
IF(WITH_QT) IF(WITH_QT)
ADD_SUBDIRECTORY(words_dic_qt) ADD_SUBDIRECTORY(words_dic_qt)
ADD_SUBDIRECTORY(message_box_qt) ADD_SUBDIRECTORY(message_box_qt)
ADD_SUBDIRECTORY(crash_report)
ENDIF(WITH_QT) ENDIF(WITH_QT)
IF(WITH_QT OR WITH_QT5)
ADD_SUBDIRECTORY(crash_report)
ENDIF(WITH_QT OR WITH_QT5)
IF(WIN32) IF(WIN32)
ADD_SUBDIRECTORY(exec_timeout) ADD_SUBDIRECTORY(exec_timeout)

@ -1,39 +1,65 @@
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SRC_DIR} ${QT_INCLUDES}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SRC_DIR} ${QT_INCLUDES})
FILE(GLOB CRASHREPORT_SRC *.cpp) FILE(GLOB CRASHREPORT_SRC *.cpp)
FILE(GLOB CRASHREPORT_HDR *h) FILE(GLOB CRASHREPORT_HDR *.h)
FILE(GLOB CRASHREPORT_UI *.ui)
SET(CRASHREPORT_MOC_HDR FILE(GLOB CRASHREPORT_MOC_HDR
crash_report_socket.h crash_report_socket.h
crash_report_widget.h crash_report_widget.h
) )
SET(CRASHREPORT_UI find_package(Qt5Network)
crash_report_widget.ui
)
IF(!WITH_QT5)
SET(QT_USE_QTGUI TRUE) SET(QT_USE_QTGUI TRUE)
SET(QT_USE_QTNETWORK TRUE) SET(QT_USE_QTNETWORK TRUE)
SET(QT_USE_QTMAIN TRUE) SET(QT_USE_QTMAIN TRUE)
SET(QT_USE_QTOPENGL FALSE) SET(QT_USE_QTOPENGL FALSE)
SET(QT_USE_QTXML FALSE) SET(QT_USE_QTXML FALSE)
INCLUDE(${QT_USE_FILE}) INCLUDE(${QT_USE_FILE})
ENDIF(!WITH_QT5)
ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_DEFINITIONS(${QT_DEFINITIONS})
IF(WITH_QT5)
SET(CMAKE_AUTOMOC ON)
QT5_WRAP_CPP(CRASHREPORT_MOC_SRC ${CRASHREPORT_MOC_HDR})
QT5_WRAP_UI(CRASHREPORT_UI_HDR ${CRASHREPORT_UI})
ELSE(WITH_QT5)
QT4_WRAP_CPP(CRASHREPORT_MOC_SRC ${CRASHREPORT_MOC_HDR}) QT4_WRAP_CPP(CRASHREPORT_MOC_SRC ${CRASHREPORT_MOC_HDR})
QT4_WRAP_UI(CRASHREPORT_UI_HDR ${CRASHREPORT_UI}) QT4_WRAP_UI(CRASHREPORT_UI_HDR ${CRASHREPORT_UI})
ENDIF(WITH_QT5)
SOURCE_GROUP(QtResources FILES ${CRASHREPORT_UI}) SOURCE_GROUP(resources FILES ${CRASHREPORT_UI})
SOURCE_GROUP(QtGeneratedUiHdr FILES ${CRASHREPORT_UI_HDR}) IF(!WITH_QT5)
SOURCE_GROUP(QtGeneratedMocQrcSrc FILES ${CRASHREPORT_MOC_SRC}) SOURCE_GROUP(generated FILES ${CRASHREPORT_UI_HDR} ${CRASHREPORT_MOC_SRC})
SOURCE_GROUP("source files" FILES ${CRASHREPORT_SRC}) ENDIF(!WITH_QT5)
SOURCE_GROUP("header files" FILES ${CRASHREPORT_HDR}) SOURCE_GROUP("" FILES ${CRASHREPORT_SRC} ${CRASHREPORT_HDR})
ADD_EXECUTABLE(crash_report WIN32 MACOSX_BUNDLE ${CRASHREPORT_SRC} ${CRASHREPORT_MOC_HDR} ${CRASHREPORT_MOC_SRC} ${CRASHREPORT_UI_HDR}) IF(WITH_QT5)
ADD_EXECUTABLE(crash_report WIN32 MACOSX_BUNDLE
${CRASHREPORT_SRC}
${CRASHREPORT_HDR}
${CRASHREPORT_UI}
)
ELSE(WITH_QT5)
ADD_EXECUTABLE(crash_report WIN32 MACOSX_BUNDLE
${CRASHREPORT_SRC}
${CRASHREPORT_MOC_HDR}
${CRASHREPORT_MOC_SRC}
${CRASHREPORT_UI_HDR}
)
ENDIF(WITH_QT5)
IF(WITH_QT5)
TARGET_LINK_LIBRARIES(crash_report
Qt5::Widgets
Qt5::Network)
ELSE(WITH_QT5)
TARGET_LINK_LIBRARIES(crash_report ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY}) TARGET_LINK_LIBRARIES(crash_report ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY})
ENDIF(WITH_QT5)
NL_DEFAULT_PROPS(crash_report "NeL, Tools, Misc: Crash Report") NL_DEFAULT_PROPS(crash_report "NeL, Tools, Misc: Crash Report")
NL_ADD_RUNTIME_FLAGS(crash_report) NL_ADD_RUNTIME_FLAGS(crash_report)
INSTALL(TARGETS crash_report RUNTIME DESTINATION ${NL_BIN_PREFIX}) INSTALL(TARGETS crash_report RUNTIME DESTINATION ${NL_BIN_PREFIX})

Loading…
Cancel
Save