mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Plugin development mode.
Temporary workaround untill a better approach is implemented.
This commit is contained in:
parent
ca1f6cda50
commit
22c882639b
@ -7,6 +7,7 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
|||||||
# Several plugin options
|
# Several plugin options
|
||||||
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(PLUGIN_DEVEL "Switch to plugin development." 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)
|
option(ENABLE_API21 "Build for 2.1 API." OFF)
|
||||||
|
|
||||||
@ -47,7 +48,10 @@ add_subdirectory(squirrel)
|
|||||||
add_subdirectory(sqrat)
|
add_subdirectory(sqrat)
|
||||||
# Include SDK library
|
# Include SDK library
|
||||||
add_subdirectory(sdk)
|
add_subdirectory(sdk)
|
||||||
|
if(PLUGIN_DEVEL)
|
||||||
|
# Include Sample module
|
||||||
|
add_subdirectory(hello)
|
||||||
|
else()
|
||||||
# Include Module library
|
# Include Module library
|
||||||
add_subdirectory(module)
|
add_subdirectory(module)
|
||||||
# Include Sample module
|
end()
|
||||||
#add_subdirectory(hello)
|
|
@ -16,5 +16,7 @@ target_include_directories(SqSDK PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
|||||||
target_include_directories(SqSDK PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
|
target_include_directories(SqSDK PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
|
||||||
# Link to required libraries
|
# Link to required libraries
|
||||||
target_link_libraries(SqSDK PRIVATE VCMP SquirrelAPI)
|
target_link_libraries(SqSDK PRIVATE VCMP SquirrelAPI)
|
||||||
# Compile definitions
|
# Switch to plugin-development mode
|
||||||
|
if(PLUGIN_DEVEL)
|
||||||
target_compile_definitions(SqSDK PUBLIC SQMOD_PLUGIN_API=1)
|
target_compile_definitions(SqSDK PUBLIC SQMOD_PLUGIN_API=1)
|
||||||
|
end()
|
@ -22,6 +22,10 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
# Set library compiler options
|
# Set library compiler options
|
||||||
target_compile_definitions(Sqrat PUBLIC SCRAT_USE_EXCEPTIONS=1 SCRAT_USE_CXX11_OPTIMIZATIONS=1)
|
target_compile_definitions(Sqrat PUBLIC SCRAT_USE_EXCEPTIONS=1 SCRAT_USE_CXX11_OPTIMIZATIONS=1)
|
||||||
|
# Switch to plugin-development mode
|
||||||
|
if(PLUGIN_DEVEL)
|
||||||
|
target_compile_definitions(Sqrat PUBLIC SQMOD_PLUGIN_API=1)
|
||||||
|
end()
|
||||||
# Set specific compiler options
|
# Set specific compiler options
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
#target_compile_options(Sqrat PRIVATE -w
|
#target_compile_options(Sqrat PRIVATE -w
|
||||||
|
@ -71,3 +71,7 @@ target_include_directories(Squirrel PRIVATE ${CMAKE_CURRENT_LIST_DIR}/stdlib)
|
|||||||
add_library(SquirrelAPI INTERFACE)
|
add_library(SquirrelAPI INTERFACE)
|
||||||
# Library includes
|
# Library includes
|
||||||
target_include_directories(SquirrelAPI INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include)
|
target_include_directories(SquirrelAPI INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include)
|
||||||
|
# Switch to plugin-development mode
|
||||||
|
if(PLUGIN_DEVEL)
|
||||||
|
target_compile_definitions(SquirrelAPI PUBLIC SQMOD_PLUGIN_API=1)
|
||||||
|
end()
|
Loading…
Reference in New Issue
Block a user