1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Allow API selection as a cmake option.

This commit is contained in:
Sandu Liviu Catalin 2020-05-01 20:41:00 +03:00
parent 4a53ec8676
commit f2be86a65e
3 changed files with 6 additions and 2 deletions

View File

@ -8,6 +8,7 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
option(BUILTIN_RUNTIMES "Include the MinGW runtime into the binary itself." ON) option(BUILTIN_RUNTIMES "Include the MinGW runtime into the binary itself." ON)
option(FORCE_32BIT_BIN "Create a 32-bit executable binary if the compiler defaults to 64-bit." OFF) option(FORCE_32BIT_BIN "Create a 32-bit executable binary if the compiler defaults to 64-bit." OFF)
option(ENABLE_MYSQL "Enable the MySQL library." OFF) option(ENABLE_MYSQL "Enable the MySQL library." OFF)
option(ENABLE_API21 "Build for 2.1 API." OFF)
# Default to c++14 standard # Default to c++14 standard
if(CMAKE_VERSION VERSION_LESS "3.1") if(CMAKE_VERSION VERSION_LESS "3.1")

View File

@ -39,7 +39,7 @@ private:
bool mSuspended; // Whether this instance is allowed to receive calls. bool mSuspended; // Whether this instance is allowed to receive calls.
bool mQuiet; // Whether this instance is allowed to handle errors. bool mQuiet; // Whether this instance is allowed to handle errors.
bool mEndure; // Whether this instance is allowed to terminate itself on errors. bool mEndure; // Whether this instance is allowed to terminate itself on errors.
bool mTerminated; // Whether this instance is allowed to terminate itself on errors. bool mTerminated; // Whether this instance was terminated once.
Uint8 mArgc; // The number of arguments that the routine must forward. Uint8 mArgc; // The number of arguments that the routine must forward.
Argument mArgv[14]; // The arguments that the routine must forward. Argument mArgv[14]; // The arguments that the routine must forward.

View File

@ -1,5 +1,8 @@
# Create the VCMP library # Create the VCMP library
add_library(VCMP STATIC vcmp.h vcmp.c vcmp20.h vcmp21.h) add_library(VCMP STATIC vcmp.h vcmp.c vcmp20.h vcmp21.h)
# Checkf for API version
if (ENABLE_API21)
target_compile_definitions(VCMP PUBLIC VCMP_SDK_2_1=1)
endif()
# Library includes # Library includes
target_include_directories(VCMP PUBLIC ${CMAKE_CURRENT_LIST_DIR}) target_include_directories(VCMP PUBLIC ${CMAKE_CURRENT_LIST_DIR})