2017-12-10 15:31:48 +11:00
|
|
|
cmake_minimum_required(VERSION 3.2)
|
2017-12-10 02:13:54 +11:00
|
|
|
project(Sapphire_Script)
|
|
|
|
|
|
|
|
file(GLOB SCRIPT_INCLUDE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
|
|
|
|
file(GLOB_RECURSE SCRIPT_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
|
2017-12-10 02:49:22 +11:00
|
|
|
|
|
|
|
include_directories("../../src/servers/")
|
|
|
|
include_directories("../../src/servers/Server_Zone/")
|
|
|
|
|
2017-12-10 02:13:54 +11:00
|
|
|
foreach(_sourcefile "${SCRIPT_FILES}")
|
|
|
|
get_filename_component(_file "${_sourcefile}" NAME_WE)
|
|
|
|
add_library("${_file}" MODULE "${_sourcefile}" "${SCRIPT_INCLUDE_FILES}")
|
|
|
|
|
2017-12-10 21:43:35 +11:00
|
|
|
target_link_libraries("${_file}" server_zone)
|
2017-12-10 02:13:54 +11:00
|
|
|
|
|
|
|
set_target_properties("${_file}" PROPERTIES
|
2017-12-10 15:31:48 +11:00
|
|
|
CXX_STANDARD 14
|
|
|
|
CXX_STANDARD_REQUIRED ON
|
|
|
|
CXX_EXTENSIONS ON
|
|
|
|
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/compiledscripts/"
|
|
|
|
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/compiledscripts/"
|
|
|
|
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/compiledscripts/"
|
|
|
|
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/compiledscripts/"
|
|
|
|
)
|
2017-12-10 02:13:54 +11:00
|
|
|
endforeach(_sourcefile "${SCRIPT_FILES}")
|