Adds demo building option. (#278)
This commit is contained in:
parent
95359461d7
commit
2670187fe0
@ -12,6 +12,8 @@ set (CMAKE_CXX_STANDARD 11)
|
||||
set (CXX_STANDARD_REQUIRED ON)
|
||||
set (CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
option (BUILD_DEMO OFF)
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
endif()
|
||||
@ -274,3 +276,8 @@ if (USE_WS OR USE_TEST)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BUILD_DEMO)
|
||||
add_executable(demo main.cpp)
|
||||
target_link_libraries(demo ixwebsocket)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user