From 03806b0528362257724271b547367215009bd6bf Mon Sep 17 00:00:00 2001 From: Javier Steinaker Date: Sat, 3 Sep 2022 09:12:54 +1000 Subject: Fix build: readline env variables should only be used when readline is detected diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index b82248c..dd75599 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -49,7 +49,12 @@ else() endif() add_executable(aft-mtp-cli ${CLI_SOURCES}) -target_include_directories(aft-mtp-cli SYSTEM PRIVATE ${Readline_INCLUDE_DIR}) +if (READLINE_FOUND) + target_include_directories(aft-mtp-cli SYSTEM PRIVATE ${Readline_INCLUDE_DIR}) +else() + target_include_directories(aft-mtp-cli SYSTEM PRIVATE) +endif() + target_link_libraries(aft-mtp-cli ${MTP_LIBRARIES} ${CLI_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) install(TARGETS aft-mtp-cli RUNTIME DESTINATION bin) -- 2.43.2 From 94f2d8686fe689308c426d318f5207555ac13c97 Mon Sep 17 00:00:00 2001 From: zeldakatze Date: Sat, 24 Feb 2024 16:57:08 +0100 Subject: fix build diff --git a/mtp/types.h b/mtp/types.h index 32024e4..17d9f44 100644 --- a/mtp/types.h +++ b/mtp/types.h @@ -28,6 +28,7 @@ #include #include #include +#include namespace mtp { -- 2.43.2