Initial rework:
- removed squirrel & sqrat sources, added sqapi as git submodule dependency - removed module api (it's now included from sqapi target) - removed unnecessary boilerplate from CMakeLists.txt
This commit is contained in:
@@ -2,11 +2,6 @@ cmake_minimum_required(VERSION 3.17)
|
||||
|
||||
project(squirrel-template)
|
||||
|
||||
option(INSTALL_AFTER_BUILD "Run cmake --install separately for every target after each build. By default this option is set to OFF" OFF)
|
||||
|
||||
set(GAME_PATH "" CACHE PATH "This option specifies the game location. It's only used for the installation step.")
|
||||
set(SERVER_PATH "" CACHE PATH "This option specifies the server location. It's only used for the installation step.")
|
||||
|
||||
file(GLOB SRC
|
||||
"src/api/squirrel_api.h"
|
||||
|
||||
@@ -23,12 +18,6 @@ target_compile_definitions(squirrel-template
|
||||
SCRAT_EXPORT
|
||||
)
|
||||
|
||||
target_precompile_headers(squirrel-template
|
||||
PRIVATE
|
||||
"src/api/module_api.h"
|
||||
"src/api/squirrel_api.h"
|
||||
)
|
||||
|
||||
target_include_directories(squirrel-template
|
||||
INTERFACE
|
||||
"include/"
|
||||
@@ -44,34 +33,4 @@ if(DEFINED OUT_FILE_SUFFIX)
|
||||
PREFIX ""
|
||||
SUFFIX ".${OUT_FILE_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if (NOT ${GAME_PATH} STREQUAL "")
|
||||
install(TARGETS squirrel-template
|
||||
RUNTIME
|
||||
DESTINATION ${GAME_PATH}
|
||||
COMPONENT "clientModule"
|
||||
)
|
||||
|
||||
if(INSTALL_AFTER_BUILD)
|
||||
add_custom_command(TARGET squirrel-template
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} --install ${CMAKE_CURRENT_BINARY_DIR} --component "clientModule"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT ${SERVER_PATH} STREQUAL "")
|
||||
install(TARGETS squirrel-template
|
||||
RUNTIME
|
||||
DESTINATION ${SERVER_PATH}
|
||||
COMPONENT "serverModule"
|
||||
)
|
||||
|
||||
if(INSTALL_AFTER_BUILD)
|
||||
add_custom_command(TARGET squirrel-template
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} --install ${CMAKE_CURRENT_BINARY_DIR} --component "serverModule"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
Reference in New Issue
Block a user