File tree 1 file changed +14
-6
lines changed 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.14)
2
- project (cpp- peglib)
2
+ project (peglib)
3
3
4
4
set (CMAKE_CXX_STANDARD 17)
5
5
set (CMAKE_CXX_EXTENSIONS OFF )
@@ -10,23 +10,31 @@ else()
10
10
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" )
11
11
endif ()
12
12
13
- option (BUILD_TESTS "Build cpp-peglib tests" ON )
14
-
15
13
set (THREADS_PREFER_PTHREAD_FLAG ON )
16
14
find_package (Threads)
17
15
18
16
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" )
19
17
set (add_link_deps Threads::Threads)
20
18
endif ()
21
19
22
- add_subdirectory (lint)
20
+ add_library (peglib INTERFACE )
21
+ target_include_directories (peglib INTERFACE ${CMAKE_SOURCE_DIR} )
23
22
24
- add_subdirectory (example)
25
- # add_subdirectory(cymbol)
23
+ option (BUILD_TESTS "Build cpp-peglib tests" ON )
24
+ option (PEGLIB_BUILD_LINT "Build cpp-peglib lint utility" OFF )
25
+ option (PEGLIB_BUILD_EXAMPLES "Build cpp-peglib examples" OFF )
26
26
27
27
if (${BUILD_TESTS} )
28
28
add_subdirectory (test )
29
29
enable_testing ()
30
30
endif ()
31
31
32
+ if (${PEGLIB_BUILD_LINT} )
33
+ add_subdirectory (lint)
34
+ endif ()
35
+
36
+ if (${PEGLIB_BUILD_EXAMPLES} )
37
+ add_subdirectory (example)
38
+ endif ()
39
+
32
40
install (FILES peglib.h DESTINATION include )
You can’t perform that action at this time.
0 commit comments