Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,25 @@ else()
file(MAKE_DIRECTORY ${LIBVTERM_INCLUDE_DIR})
endif()

# Prefer system emacs-modules.h, usually from an Emacs installation.
option(USE_SYSTEM_EMACS_MODULE_HEADER
"Use system emacs-module.h instead of the vendored version." ON)

if (USE_SYSTEM_EMACS_MODULE_HEADER)
find_path(EMACS_MODULE_HEADER_DIR
NAMES emacs-module.h
)

# emacs-module.h found.
if (EMACS_MODULE_HEADER_DIR)
message(STATUS "System emacs-module.h detected")
target_include_directories(vterm-module PRIVATE ${EMACS_MODULE_HEADER_DIR})
else()
message(STATUS "System emacs-module.h not detected. Using vendored version.")
target_include_directories(vterm-module PRIVATE "${CMAKE_SOURCE_DIR}/vendor")
endif()
endif()

add_library(vterm STATIC IMPORTED)
set_target_properties(vterm PROPERTIES IMPORTED_LOCATION ${LIBVTERM_LIBRARY})
target_include_directories(vterm INTERFACE ${LIBVTERM_INCLUDE_DIR})
Expand Down
File renamed without changes.