File tree Expand file tree Collapse file tree 5 files changed +57
-18
lines changed Expand file tree Collapse file tree 5 files changed +57
-18
lines changed Original file line number Diff line number Diff line change 1+ # EditorConfig configuration for PatchELF
2+ # http://EditorConfig.org
3+
4+ # Top-most EditorConfig file
5+ root = true
6+
7+ # Unix-style newlines with a newline ending every file, UTF-8 charset
8+ [* ]
9+ end_of_line = lf
10+ insert_final_newline = true
11+ trim_trailing_whitespace = true
12+ charset = utf-8
13+
14+ # Match Nix files, set indent to spaces with width of two
15+ [* .nix ]
16+ indent_style = space
17+ indent_size = 2
18+
19+ # Match C++/C/shell, set indent to spaces with width of four
20+ [* .{hpp,cc,hh,c,h,sh} ]
21+ indent_style = space
22+ indent_size = 4
23+
24+ # Match diffs, avoid to trim trailing whitespace
25+ [* .{diff,patch} ]
26+ trim_trailing_whitespace = false
Original file line number Diff line number Diff line change @@ -2,26 +2,12 @@ cmake_minimum_required(VERSION 3.5)
22
33project (patchelf)
44
5- include (GNUInstallDirs)
6-
7- set (CMAKE_CXX_STANDARD 17)
8- set (CMAKE_CXX_EXTENSIONS OFF )
9-
10- set (PAGESIZE 4096)
11-
12- set (ADDITIONAL_HEADERS src/elf.h)
13-
14- set (SOURCES src/patchelf.cc)
15-
165file (READ version VERSION )
176
18- add_executable (${PROJECT_NAME} ${SOURCES} ${ADDITIONAL_HEADERS} )
19-
20- target_compile_definitions (
21- patchelf PRIVATE PAGESIZE=${PAGESIZE}
22- PACKAGE_STRING="patchelf ${VERSION_STRING} " )
7+ include (GNUInstallDirs)
238
24- install (TARGETS patchelf RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
9+ add_subdirectory (src)
10+ # add_subdirectory(tests) # TODO
2511
2612install (FILES patchelf.1 DESTINATION ${CMAKE_INSTALL_MANDIR} /man1)
2713
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ make check
8181sudo make install
8282```
8383
84- ## Via [ CMake] ( https://cmake.org/ ) (and [ Ninja] ( https://ninja-build.org/ ) )
84+ ### Via [ CMake] ( https://cmake.org/ ) (and [ Ninja] ( https://ninja-build.org/ ) )
8585
8686``` console
8787mkdir build
@@ -91,6 +91,16 @@ ninja all
9191sudo ninja install
9292```
9393
94+ ### Via [ Meson] ( https://mesonbuild.com/ ) (and [ Ninja] ( https://ninja-build.org/ ) )
95+
96+ ``` console
97+ mkdir build
98+ meson configure build
99+ cd build
100+ ninja all
101+ sudo ninja install
102+ ```
103+
94104### Via Nix
95105
96106You can build with Nix in several ways.
Original file line number Diff line number Diff line change 3939 ( lib . fileset . difference ./src (
4040 lib . fileset . unions [
4141 ./src/Makefile.am
42+ ./src/CMakeLists.txt
4243 ./src/meson.build
4344 ]
4445 ) )
4546 ( lib . fileset . difference ./tests (
4647 lib . fileset . unions [
4748 ./tests/Makefile.am
49+ #./tests/CMakeLists.txt
4850 #./tests/meson.build
4951 ]
5052 ) )
6163
6264 cmakeSrcFiles = [
6365 ./CMakeLists.txt
66+ ./src/CMakeLists.txt
67+ #./tests/CMakeLists.txt
6468 ] ;
6569
6670 mesonSrcFiles = [
6771 ./meson.build
6872 ./meson.options
6973 ./src/meson.build
74+ #./tests/meson.build
7075 ] ;
7176
7277 autotoolsSrc = lib . fileset . toSource {
Original file line number Diff line number Diff line change 1+ set (CMAKE_CXX_STANDARD 17)
2+ set (CMAKE_CXX_EXTENSIONS OFF )
3+
4+ set (PAGESIZE 4096)
5+
6+ add_executable (${PROJECT_NAME} patchelf.cc elf.h patchelf.h)
7+
8+ target_compile_definitions (
9+ patchelf PRIVATE PAGESIZE=${PAGESIZE}
10+ PACKAGE_STRING="patchelf ${VERSION_STRING} " )
11+
12+ install (TARGETS patchelf RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
You can’t perform that action at this time.
0 commit comments