Skip to content

Commit de558b2

Browse files
committed
Reformat CMakeLists.txt to use tabs for indentation.
1 parent 43dda90 commit de558b2

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

CMakeLists.txt

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.16)
55
set(CMAKE_CXX_STANDARD 17)
66
set(CMAKE_CXX_STANDARD_REQUIRED true)
77
if(APPLE)
8-
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13 CACHE STRING "")
8+
set(CMAKE_OSX_DEPLOYMENT_TARGET 11 CACHE STRING "")
99
endif()
1010

1111
set(src ${CMAKE_SOURCE_DIR})
@@ -15,53 +15,53 @@ include(FetchContent)
1515
set(FETCHCONTENT_QUIET OFF)
1616
set(diff_match_patch_zip 7f95b37e554453262e2bcda830724fc362614103.zip)
1717
FetchContent_Declare(diff_match_patch
18-
URL https://github.com/leutloff/diff-match-patch-cpp-stl/archive/${diff_match_patch_zip})
18+
URL https://github.com/leutloff/diff-match-patch-cpp-stl/archive/${diff_match_patch_zip})
1919
FetchContent_MakeAvailable(diff_match_patch)
2020
set(lua_tgz lua-5.4.4.tar.gz)
2121
set(lua_url file://${CMAKE_BINARY_DIR}/_deps/${lua_tgz})
2222
if(NOT EXISTS ${CMAKE_BINARY_DIR}/_deps/${lua_tgz})
23-
set(lua_url https://www.lua.org/ftp/${lua_tgz})
23+
set(lua_url https://www.lua.org/ftp/${lua_tgz})
2424
endif()
2525
FetchContent_Declare(lua URL ${lua_url})
2626
FetchContent_MakeAvailable(lua)
2727

2828
# Build.
2929
project(diff LANGUAGES CXX C)
3030
if(WIN32)
31-
# On Windows, DLLs cannot do dynamic lookup. They need symbols to link to at build time.
32-
# Rather than fetching a Textadept build and creating separate DLLs linked to textadept.lib and
33-
# textadept-curses.lib, just embed a minimal copy of Lua in a single DLL.
34-
file(GLOB lua_src ${lua_SOURCE_DIR}/src/*.c)
35-
list(FILTER lua_src EXCLUDE REGEX "(lua|luac|[^x]lib|linit)\.c$") # of *lib.c, keep only lauxlib.c
31+
# On Windows, DLLs cannot do dynamic lookup. They need symbols to link to at build time.
32+
# Rather than fetching a Textadept build and creating separate DLLs linked to textadept.lib and
33+
# textadept-curses.lib, just embed a minimal copy of Lua in a single DLL.
34+
file(GLOB lua_src ${lua_SOURCE_DIR}/src/*.c)
35+
list(FILTER lua_src EXCLUDE REGEX "(lua|luac|[^x]lib|linit)\.c$") # of *lib.c, keep only lauxlib.c
3636
endif()
3737
add_library(diff SHARED diff.cxx ${lua_src})
3838
target_include_directories(diff PRIVATE ${diff_match_patch_SOURCE_DIR} ${lua_SOURCE_DIR}/src)
3939
if(WIN32)
40-
target_compile_definitions(diff PRIVATE LUA_BUILD_AS_DLL LUA_LIB)
40+
target_compile_definitions(diff PRIVATE LUA_BUILD_AS_DLL LUA_LIB)
4141
elseif(APPLE)
42-
target_link_options(diff PRIVATE -undefined dynamic_lookup)
42+
target_link_options(diff PRIVATE -undefined dynamic_lookup)
4343
endif()
4444

4545
# Install.
4646
install(TARGETS diff DESTINATION ${src})
4747
if(NOT (WIN32 OR APPLE))
48-
install(CODE "file(RENAME ${src}/libdiff.so ${src}/diff.so)")
48+
install(CODE "file(RENAME ${src}/libdiff.so ${src}/diff.so)")
4949
elseif(APPLE)
50-
install(CODE "file(RENAME ${src}/libdiff.dylib ${src}/diffosx.so)")
50+
install(CODE "file(RENAME ${src}/libdiff.dylib ${src}/diffosx.so)")
5151
endif()
5252
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})
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})
5757
endif()
5858

5959
# Documentation.
6060
get_filename_component(ta_dir ${src}/../../ ABSOLUTE)
6161
add_custom_target(docs DEPENDS README.md)
6262
add_custom_command(OUTPUT ${src}/README.md
63-
COMMAND ldoc --filter markdowndoc.ldoc ${src}/init.lua > ${src}/README.md
64-
COMMAND sed -i -e "1,+4d" -e "6c# File Diff" -e "7d" -e "s/^##/#/;" ${src}/README.md
65-
DEPENDS init.lua
66-
WORKING_DIRECTORY ${ta_dir}/scripts
67-
VERBATIM)
63+
COMMAND ldoc --filter markdowndoc.ldoc ${src}/init.lua > ${src}/README.md
64+
COMMAND sed -i -e "1,+4d" -e "6c# File Diff" -e "7d" -e "s/^##/#/;" ${src}/README.md
65+
DEPENDS init.lua
66+
WORKING_DIRECTORY ${ta_dir}/scripts
67+
VERBATIM)

0 commit comments

Comments
 (0)