forked from openkylin/ukui-menu
禁用qml_debug,更新CmakeList
This commit is contained in:
parent
bb1f13c41a
commit
b22b504ea6
|
@ -169,14 +169,8 @@ add_executable(
|
|||
${SOURCE_FILES}
|
||||
)
|
||||
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
string(TOLOWER ${CMAKE_BUILD_TYPE} BUILD_TYPE)
|
||||
if (${BUILD_TYPE} STREQUAL "debug")
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE UKUI_MENU_LOG_FILE_DISABLE)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<CONFIG:Debug>:UKUI_MENU_LOG_FILE_DISABLE>)
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<CONFIG:Debug>:QT_QML_DEBUG>)
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
Qt5::Core
|
||||
|
|
|
@ -119,8 +119,8 @@ void messageOutput(QtMsgType type, const QMessageLogContext &context, const QStr
|
|||
int main(int argc, char *argv[])
|
||||
{
|
||||
startupTime = QDateTime::currentDateTime().toMSecsSinceEpoch();
|
||||
initLogFile();
|
||||
#ifndef UKUI_MENU_LOG_FILE_DISABLE
|
||||
initLogFile();
|
||||
qInstallMessageHandler(messageOutput);
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue