File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.14)
2- project (cpp- peglib)
2+ project (peglib)
33
44set (CMAKE_CXX_STANDARD 17)
55set (CMAKE_CXX_EXTENSIONS OFF )
@@ -10,23 +10,31 @@ else()
1010 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" )
1111endif ()
1212
13- option (BUILD_TESTS "Build cpp-peglib tests" ON )
14-
1513set (THREADS_PREFER_PTHREAD_FLAG ON )
1614find_package (Threads)
1715
1816if (CMAKE_SYSTEM_NAME STREQUAL "Linux" )
1917 set (add_link_deps Threads::Threads)
2018endif ()
2119
22- add_subdirectory (lint)
20+ add_library (peglib INTERFACE )
21+ target_include_directories (peglib INTERFACE ${CMAKE_SOURCE_DIR} )
2322
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 )
2626
2727if (${BUILD_TESTS} )
2828 add_subdirectory (test )
2929 enable_testing ()
3030endif ()
3131
32+ if (${PEGLIB_BUILD_LINT} )
33+ add_subdirectory (lint)
34+ endif ()
35+
36+ if (${PEGLIB_BUILD_EXAMPLES} )
37+ add_subdirectory (example)
38+ endif ()
39+
3240install (FILES peglib.h DESTINATION include )
You can’t perform that action at this time.
0 commit comments