File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ Language : Cpp
3
+ BasedOnStyle : Microsoft
4
+ IndentAccessModifiers : false
5
+ IndentCaseLabels : true
6
+ IndentCaseBlocks : false
7
+ IndentGotoLabels : false
8
+ IndentPPDirectives : None
9
+ IndentExternBlock : NoIndent
10
+ IndentRequires : false
11
+ UseTab : Always
12
+ IndentWidth : 4
13
+ TabWidth : 4
14
+ SortIncludes : Never
15
+ AlignEscapedNewlines : DontAlign
16
+ ColumnLimit : 80
17
+ Cpp11BracedListStyle : false
18
+ ---
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
23
23
find_package (SDL2_mixer REQUIRED CONFIG REQUIRED COMPONENTS SDL2_mixer)
24
24
25
25
file (GLOB TARADINO_SOURCES "${PROJECT_SOURCE_DIR} /rott/*.c" )
26
+ file (GLOB TARADINO_HEADERS "${PROJECT_SOURCE_DIR} /rott/*.h" )
26
27
27
28
if (WIN32 OR MSVC OR CMAKE_SYSTEM_NAME STREQUAL "Windows" )
28
29
list (APPEND TARADINO_SOURCES "${PROJECT_SOURCE_DIR} /misc/taradino.rc" )
@@ -103,6 +104,14 @@ else()
103
104
install (TARGETS taradino DESTINATION ${CMAKE_INSTALL_BINDIR} )
104
105
endif ()
105
106
107
+ find_program (CLANGFORMAT_EXECUTABLE clang-format)
108
+ if (CLANGFORMAT_EXECUTABLE)
109
+ add_custom_target (clangformat
110
+ COMMAND ${CLANGFORMAT_EXECUTABLE} -style=file -i ${TARADINO_SOURCES} ${TARADINO_HEADERS}
111
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
112
+ )
113
+ endif ()
114
+
106
115
set (CPACK_GENERATOR ZIP)
107
116
set (CPACK_PACKAGE_NAME ${TARADINO_EXEC} )
108
117
set (CPACK_SOURCE_GENERATOR TGZ ZIP)
You can’t perform that action at this time.
0 commit comments