diff --git a/.gitignore b/.gitignore index 31074b0..eafe301 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,6 @@ CTestTestfile.cmake # JetBrains .idea/ + +# Intercept library +vendor/intercept/ diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 02d091d..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "intercept"] - path = intercept - url = https://github.com/intercept/intercept.git \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 960d5cb..4c3858b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.6) +cmake_minimum_required (VERSION 3.8) #----Make changes here @@ -9,6 +9,9 @@ project (template-plugin) #Enabling this results in better performance when handling strings to SQF commands. option(USE_ENGINE_TYPES "USE_ENGINE_TYPES" OFF) +#Which version of Intercept to build against, branch/commit/tag +set(INTERCEPT_VERSION "master") + #----Don't change anything below this line option(USE_64BIT_BUILD "USE_64BIT_BUILD" OFF) @@ -38,4 +41,14 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE) -add_subdirectory(src) \ No newline at end of file +add_subdirectory(src) + +include(ExternalProject) + +# Download Intercept library to vendor folder +ExternalProject_Add( + intercept + PREFIX ${CMAKE_CURRENT_LIST_DIR}/vendor/intercept + URL https://github.com/intercept/intercept/archive/${INTERCEPT_VERSION}.tar.gz + INSTALL_COMMAND "" +) diff --git a/intercept b/intercept deleted file mode 160000 index f283e2f..0000000 --- a/intercept +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f283e2fd3ce1024e496c6c17eb27f81693f05ca8 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f686ce7..4a92d09 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -15,8 +15,8 @@ SOURCE_GROUP("src" FILES ${INTERCEPT_PLUGIN_SOURCES}) #----Don't change anything below this line -#include the Intercept headers from the submodule -set(INTERCEPT_CLIENT_PATH "${CMAKE_SOURCE_DIR}/intercept/src/client") +#include the Intercept headers from the vendored library +set(INTERCEPT_CLIENT_PATH "${CMAKE_SOURCE_DIR}/vendor/intercept/src/intercept/src/client") set(INTERCEPT_INCLUDE_PATH "${INTERCEPT_CLIENT_PATH}/headers" "${INTERCEPT_CLIENT_PATH}/headers/shared" "${INTERCEPT_CLIENT_PATH}/headers/client/" "${INTERCEPT_CLIENT_PATH}/headers/client/sqf")