Skip to content

Commit

Permalink
Merge pull request #2 from darren-harton/websocket
Browse files Browse the repository at this point in the history
Added oatpp-websocket
  • Loading branch information
ajakhotia authored Apr 20, 2020
2 parents c670a5d + 1defbbb commit 0d6813d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ if (ROBOT_FARM_BUILD_ALL OR ROBOT_FARM_BUILD_OATPP)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/OatppExternalProject.cmake)
endif ()

option(ROBOT_FARM_BUILD_OATPP_WEBSOCKET "Build oatpp websocket" OFF)
if (ROBOT_FARM_BUILD_ALL OR ROBOT_FARM_BUILD_OATPP_WEBSOCKET)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/OatppWebSocketExternalProject.cmake)
endif ()

option(ROBOT_FARM_BUILD_OGRE "Build OGRE" OFF)
if (ROBOT_FARM_BUILD_ALL OR ROBOT_FARM_BUILD_OGRE)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/OgreExternalProject.cmake)
Expand Down
24 changes: 24 additions & 0 deletions cmake/OatppWebSocketExternalProject.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#[[ CMake guard. ]]
if(TARGET OatppWebsocketExternalProject)
return()
endif()

include(ExternalProject)
include(${CMAKE_CURRENT_LIST_DIR}/OatppExternalProject.cmake)

set(ROBOT_FARM_OATPP_WEBSOCKET_URL
"https://github.com/oatpp/oatpp-websocket/archive/1.0.0.zip"
CACHE STRING
"URL of the oatpp-websocket source archive")

externalproject_add(OatppWebsocketExternalProject
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/oatpp-websocket
URL ${ROBOT_FARM_OATPP_WEBSOCKET_URL}
DOWNLOAD_NO_PROGRESS ON
CMAKE_ARGS
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_PREFIX_PATH:PATH=${CMAKE_INSTALL_PREFIX}
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
-DBUILD_SHARED_LIBS:BOOL=ON)

add_dependencies(OatppWebsocketExternalProject OatppExternalProject)

0 comments on commit 0d6813d

Please sign in to comment.