Added the libevent library.
This commit is contained in:
parent
f36a00c603
commit
a8a7488b54
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -25,3 +25,6 @@
|
|||||||
[submodule "lib/SQLiteCpp"]
|
[submodule "lib/SQLiteCpp"]
|
||||||
path = lib/SQLiteCpp
|
path = lib/SQLiteCpp
|
||||||
url = https://github.com/mc-server/SQLiteCpp.git
|
url = https://github.com/mc-server/SQLiteCpp.git
|
||||||
|
[submodule "lib/libevent"]
|
||||||
|
path = lib/libevent
|
||||||
|
url = https://github.com/mc-server/libevent.git
|
||||||
|
@ -95,6 +95,13 @@ set(SQLITECPP_BUILD_EXAMPLES OFF CACHE BOOL "Build examples."
|
|||||||
set(SQLITECPP_BUILD_TESTS OFF CACHE BOOL "Build and run tests." FORCE)
|
set(SQLITECPP_BUILD_TESTS OFF CACHE BOOL "Build and run tests." FORCE)
|
||||||
set(SQLITECPP_INTERNAL_SQLITE OFF CACHE BOOL "Add the internal SQLite3 source to the project." FORCE)
|
set(SQLITECPP_INTERNAL_SQLITE OFF CACHE BOOL "Add the internal SQLite3 source to the project." FORCE)
|
||||||
|
|
||||||
|
# Set options for LibEvent, disable all their tests and benchmarks:
|
||||||
|
set(EVENT__DISABLE_OPENSSL YES CACHE BOOL "Disable OpenSSL in LibEvent" FORCE)
|
||||||
|
set(EVENT__DISABLE_BENCHMARK YES CACHE BOOL "Disable LibEvent benchmarks" FORCE)
|
||||||
|
set(EVENT__DISABLE_TESTS YES CACHE BOOL "Disable LibEvent tests" FORCE)
|
||||||
|
set(EVENT__DISABLE_REGRESS YES CACHE BOOL "Disable LibEvent regression tests" FORCE)
|
||||||
|
set(EVENT__DISABLE_SAMPLES YES CACHE BOOL "Disable LibEvent samples" FORCE)
|
||||||
|
|
||||||
# Check that the libraries are present:
|
# Check that the libraries are present:
|
||||||
if (NOT EXISTS ${CMAKE_SOURCE_DIR}/lib/SQLiteCpp/CMakeLists.txt)
|
if (NOT EXISTS ${CMAKE_SOURCE_DIR}/lib/SQLiteCpp/CMakeLists.txt)
|
||||||
message(FATAL_ERROR "SQLiteCpp is missing in folder lib/SQLiteCpp. Have you initialized the submodules / downloaded the extra libraries?")
|
message(FATAL_ERROR "SQLiteCpp is missing in folder lib/SQLiteCpp. Have you initialized the submodules / downloaded the extra libraries?")
|
||||||
@ -102,6 +109,9 @@ endif()
|
|||||||
if (NOT EXISTS ${CMAKE_SOURCE_DIR}/lib/polarssl/CMakeLists.txt)
|
if (NOT EXISTS ${CMAKE_SOURCE_DIR}/lib/polarssl/CMakeLists.txt)
|
||||||
message(FATAL_ERROR "PolarSSL is missing in folder lib/polarssl. Have you initialized the submodules / downloaded the extra libraries?")
|
message(FATAL_ERROR "PolarSSL is missing in folder lib/polarssl. Have you initialized the submodules / downloaded the extra libraries?")
|
||||||
endif()
|
endif()
|
||||||
|
if (NOT EXISTS ${CMAKE_SOURCE_DIR}/lib/libevent/CMakeLists.txt)
|
||||||
|
message(FATAL_ERROR "LibEvent is missing in folder lib/libevent. Have you initialized and updated the submodules / downloaded the extra libraries?")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Include all the libraries:
|
# Include all the libraries:
|
||||||
add_subdirectory(lib/jsoncpp/)
|
add_subdirectory(lib/jsoncpp/)
|
||||||
@ -112,6 +122,7 @@ add_subdirectory(lib/sqlite/)
|
|||||||
add_subdirectory(lib/SQLiteCpp/)
|
add_subdirectory(lib/SQLiteCpp/)
|
||||||
add_subdirectory(lib/expat/)
|
add_subdirectory(lib/expat/)
|
||||||
add_subdirectory(lib/luaexpat/)
|
add_subdirectory(lib/luaexpat/)
|
||||||
|
add_subdirectory(lib/libevent/)
|
||||||
|
|
||||||
# Add proper include directories so that SQLiteCpp can find SQLite3:
|
# Add proper include directories so that SQLiteCpp can find SQLite3:
|
||||||
get_property(SQLITECPP_INCLUDES DIRECTORY "lib/SQLiteCpp/" PROPERTY INCLUDE_DIRECTORIES)
|
get_property(SQLITECPP_INCLUDES DIRECTORY "lib/SQLiteCpp/" PROPERTY INCLUDE_DIRECTORIES)
|
||||||
|
1
lib/libevent
Submodule
1
lib/libevent
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 0b49ae34594533daa82c06a506078de9e336a013
|
@ -323,4 +323,4 @@ endif ()
|
|||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_link_libraries(${EXECUTABLE} expat tolualib ws2_32.lib Psapi.lib)
|
target_link_libraries(${EXECUTABLE} expat tolualib ws2_32.lib Psapi.lib)
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(${EXECUTABLE} luaexpat jsoncpp polarssl zlib sqlite lua SQLiteCpp)
|
target_link_libraries(${EXECUTABLE} luaexpat jsoncpp polarssl zlib sqlite lua SQLiteCpp event_core event_extra)
|
||||||
|
Loading…
Reference in New Issue
Block a user