From ee04a7e23dcf75e30651004942f378d016fd0121 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 12 Apr 2023 23:06:36 +0900 Subject: [PATCH] Fix SEGV at runtime caused by invalid platform detection at build time Signed-off-by: Michele Calgaro --- CMakeLists.txt | 1 + include/Platform.h | 2 +- src/CMakeLists.txt | 2 +- tqt/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 36dd942..cb91951 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,6 +79,7 @@ set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" add_subdirectory( src ) add_subdirectory( tqt ) +add_subdirectory( example ) tde_conditional_add_subdirectory( BUILD_PLUGIN designer ) tde_conditional_add_project_docs( BUILD_DOC ) diff --git a/include/Platform.h b/include/Platform.h index 19a6c40..303164b 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -26,7 +26,7 @@ #undef PLAT_FOX #define PLAT_FOX 1 -#elif defined(QT) +#elif defined(TQT) #undef PLAT_TQT #define PLAT_TQT 1 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2c565cf..51ca327 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,7 +11,7 @@ link_directories( ${TQT_LIBRARY_DIRS} ) -add_definitions( -DQT -DSCI_LEXER ) +add_definitions( -DTQT -DSCI_LEXER ) ##### src (static) diff --git a/tqt/CMakeLists.txt b/tqt/CMakeLists.txt index fa173d3..3cc49db 100644 --- a/tqt/CMakeLists.txt +++ b/tqt/CMakeLists.txt @@ -11,7 +11,7 @@ link_directories( ${TQT_LIBRARY_DIRS} ) -add_definitions( -DTQT ) +add_definitions( -DTQT -DSCI_LEXER ) ##### tqscintilla (shared)