@ -10,7 +10,9 @@ else()
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" )
endif ( )
option ( BUILD_TESTS "Build cpp-peglib tests" ON )
option ( PEGLIB_BUILD_TESTS "Build cpp-peglib tests" OFF )
option ( PEGLIB_BUILD_LINT "Build cpp-peglib lint utility" OFF )
option ( PEGLIB_BUILD_EXAMPLES "Build cpp-peglib examples" OFF )
set ( THREADS_PREFER_PTHREAD_FLAG ON )
find_package ( Threads )
@ -19,10 +21,16 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set ( add_link_deps Threads::Threads )
endif ( )
add_subdirectory ( lint )
add_library ( Peglib INTERFACE )
target_include_directories ( Peglib INTERFACE ${ CMAKE_SOURCE_DIR } )
add_subdirectory ( example )
# add_subdirectory ( cymbol )
if ( ${ PEGLIB_BUILD_LINT } )
add_subdirectory ( lint )
endif ( )
if ( ${ PEGLIB_BUILD_EXAMPLES } )
add_subdirectory ( example )
endif ( )
if ( ${ BUILD_TESTS } )
add_subdirectory ( test )