fixing debug facility in when NDEBUG is set

- changed libvterm.cmake so it is easier to integrate in other projects
Gentoo
Christian Burger 2022-04-14 09:31:19 +02:00
parent 4ca933a158
commit f1d0c012b7
3 changed files with 13 additions and 5 deletions

View File

@ -17,6 +17,10 @@ add_library(NCursesPtyWindow Window.cpp SingleUserInput.cpp Debug.cpp)
### libraries
include("cmake/libvterm.cmake")
if(EXISTS libvtermProject)
add_dependencies(NCursesPtyWindow libvtermProject)
endif()
find_library(UTIL_LIBRARY util)
target_link_libraries(NCursesPtyWindow ${CURSES_LIBRARIES} ${LIBVTERM_LIBRARY} ${UTIL_LIBRARY})

View File

@ -118,9 +118,9 @@ namespace krikkel
#define __debug_stringify_switch_case_end_bool(value)
#define __debug_stringify_switch_case_end_string(value)
#define __debug_stringify_switch_case_end_number(value)
#define __debug_stringify_switch_end()
#define __debug_make_bytes_printable_table(bytes)
#define __debug_make_bytes_printable(bytes)
#define __debug_stringify_switch_end(__prop)
#define __debug_make_bytes_printable_table(__bytes)
#define __debug_make_bytes_printable(__bytes)
#endif /* NDEBUG */

View File

@ -1,7 +1,12 @@
# @author Christian Burger <christian@krikkel.de>
# @brief searches for libvterm and builds it if not found
#
# requires NCursesPtyWindow target; provides LIBVTERM_LIBRARY
# provides LIBVTERM_LIBRARY and include path
# dependency must be added like this:
# if(EXISTS libvtermProject)
# add_dependencies(<targetDependingOn> libvtermProject)
# endif()
find_library(LIBVTERM_LIBRARY NAMES libvterm.so.0.0.2 vterm)
@ -17,5 +22,4 @@ if(LIBVTERM_LIBRARY STREQUAL "LIBVTERM_LIBRARY-NOTFOUND")
ExternalProject_Get_property(libvtermProject SOURCE_DIR)
set(LIBVTERM_LIBRARY "${SOURCE_DIR}/.libs/libvterm.a")
include_directories(SYSTEM "${SOURCE_DIR}/include")
add_dependencies(NCursesPtyWindow libvtermProject)
endif()