[all] common: set the backtrace define for the entire project

This commit is contained in:
Geoffrey McRae 2025-03-07 11:32:24 +11:00
parent 66ac453c98
commit 968fd42d46
2 changed files with 31 additions and 4 deletions

27
client/src/app_internal.h Normal file
View File

@ -0,0 +1,27 @@
/**
* Looking Glass
* Copyright © 2017-2025 The Looking Glass Authors
* https://looking-glass.io
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc., 59
* Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _H_LG_APP_INTERNAL_
#define _H_LG_APP_INTERNAL_
void app_handleKeyPressInternal(int scancode);
void app_handleKeyReleaseInternal(int scancode);
#endif

View File

@ -9,10 +9,6 @@ include_directories(
add_definitions(-D_GNU_SOURCE) add_definitions(-D_GNU_SOURCE)
if(ENABLE_BACKTRACE)
add_definitions(-DENABLE_BACKTRACE)
endif()
if (CMAKE_C_COMPILER_ID STREQUAL "Clang") if (CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_compile_options( add_compile_options(
"-Wno-unknown-warning-option" "-Wno-unknown-warning-option"
@ -41,6 +37,10 @@ set(COMMON_SOURCES
add_library(lg_common STATIC ${COMMON_SOURCES}) add_library(lg_common STATIC ${COMMON_SOURCES})
target_link_libraries(lg_common lg_common_platform) target_link_libraries(lg_common lg_common_platform)
if(ENABLE_BACKTRACE)
target_compile_definitions(lg_common PUBLIC -DENABLE_BACKTRACE)
endif()
target_include_directories(lg_common target_include_directories(lg_common
INTERFACE INTERFACE
include include