2022-01-04 09:07:22 +00:00
|
|
|
# Source Code for raknet
|
|
|
|
file(
|
2022-01-22 10:27:19 +00:00
|
|
|
GLOB SOURCES_RAKNET
|
|
|
|
LIST_DIRECTORIES false
|
|
|
|
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/raknet/Source/*.cpp
|
2022-01-04 09:07:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Source Code for recast
|
|
|
|
file(
|
2022-01-22 10:27:19 +00:00
|
|
|
GLOB SOURCES_RECAST
|
|
|
|
LIST_DIRECTORIES false
|
|
|
|
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/recastnavigation/Recast/Source/*.cpp
|
2022-01-04 09:07:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Source Code for detour
|
|
|
|
file(
|
2022-01-22 10:27:19 +00:00
|
|
|
GLOB SOURCES_DETOUR
|
|
|
|
LIST_DIRECTORIES false
|
|
|
|
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/recastnavigation/Detour/Source/*.cpp
|
2022-01-04 09:07:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Source Code for tinyxml2
|
|
|
|
file(
|
2022-01-22 10:27:19 +00:00
|
|
|
GLOB SOURCES_TINYXML2
|
|
|
|
LIST_DIRECTORIES false
|
|
|
|
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/tinyxml2/tinyxml2.cpp
|
2022-01-04 09:07:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Source Code for libbcrypt
|
|
|
|
file(
|
2022-01-22 10:27:19 +00:00
|
|
|
GLOB SOURCES_LIBBCRYPT
|
|
|
|
LIST_DIRECTORIES false
|
|
|
|
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/libbcrypt/*.c
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/libbcrypt/src/*.c
|
2022-01-04 09:07:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
file(
|
2022-01-22 10:27:19 +00:00
|
|
|
GLOB SOURCES_SQLITE3
|
|
|
|
LIST_DIRECTORIES false
|
|
|
|
RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/SQLite/*.cpp
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/SQLite/*.c
|
2022-01-04 09:07:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# 3rdparty static libraries:
|
|
|
|
add_library(raknet ${SOURCES_RAKNET})
|
|
|
|
add_library(tinyxml2 ${SOURCES_TINYXML2})
|
|
|
|
add_library(detour ${SOURCES_DETOUR})
|
|
|
|
add_library(recast ${SOURCES_RECAST})
|
|
|
|
add_library(libbcrypt ${SOURCES_LIBBCRYPT})
|
|
|
|
add_library(sqlite3 ${SOURCES_SQLITE3})
|
|
|
|
|
|
|
|
if(UNIX)
|
2022-01-22 10:27:19 +00:00
|
|
|
target_link_libraries(sqlite3 pthread dl m)
|
2022-01-04 09:07:22 +00:00
|
|
|
|
2022-01-22 10:27:19 +00:00
|
|
|
# -Wno-unused-result -Wno-unknown-pragmas -fpermissive
|
|
|
|
target_compile_options(sqlite3 PRIVATE "-Wno-return-local-addr" "-Wno-maybe-uninitialized")
|
|
|
|
target_compile_options(raknet PRIVATE "-Wno-write-strings" "-Wformat-overflow=0" "-Wformat=0")
|
|
|
|
target_compile_options(libbcrypt PRIVATE "-Wno-implicit-function-declaration" "-Wno-int-conversion")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
target_link_libraries(raknet ws2_32)
|
|
|
|
endif()
|