Skip to content

Commit 12b2d80

Browse files
committed
CMake install rule on Linux should also install to Textadept's modules directory.
1 parent 7d580a4 commit 12b2d80

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
shell: bash
2222
run: |
2323
mkdir -p build/_deps && mv textadept-build/* build/_deps && rm -r textadept-build
24-
cmake -S . -B build
24+
cmake -S . -B build -D CMAKE_INSTALL_PREFIX=build/install
2525
cmake --build build --config Release --target diff -j
2626
cmake --install build --config Release
2727
- name: Upload artifacts

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ if(NOT (WIN32 OR APPLE))
4949
elseif(APPLE)
5050
install(CODE "file(RENAME ${src}/libdiff.dylib ${src}/diffosx.so)")
5151
endif()
52+
if(NOT (WIN32 OR APPLE))
53+
include(GNUInstallDirs)
54+
set(module_dir ${CMAKE_INSTALL_FULL_DATADIR}/textadept/modules/file_diff)
55+
install(CODE "file(MAKE_DIRECTORY ${module_dir})")
56+
install(FILES init.lua diff.so DESTINATION ${module_dir})
57+
endif()
5258

5359
# Documentation.
5460
get_filename_component(ta_dir ${src}/../../ ABSOLUTE)

0 commit comments

Comments
 (0)