Build: Modernize include directory management using target_sources(FILE_SET)

This commit is contained in:
Shauren
2025-11-12 22:53:54 +01:00
parent 7ccc2d4f6b
commit 3331699906
29 changed files with 624 additions and 639 deletions
+29 -20
View File
@@ -8,39 +8,47 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# Collects all source files into the given variable, # Adds all found source files to a given target
# which is useful to include all sources in subdirectories.
# Ignores full qualified directories listed in the variadic arguments.
# #
# Use it like: # Use it like:
# CollectSourceFiles( # CollectAndAddSourceFiles(
# common
# ${CMAKE_CURRENT_SOURCE_DIR} # ${CMAKE_CURRENT_SOURCE_DIR}
# COMMON_PRIVATE_SOURCES # EXCLUDE
# # Exclude
# ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders # ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders
# ${CMAKE_CURRENT_SOURCE_DIR}/Platform) # ${CMAKE_CURRENT_SOURCE_DIR}/Platform)
# #
function(CollectSourceFiles current_dir variable) function(CollectAndAddSourceFiles target_name current_dir)
list(FIND ARGN "${current_dir}" IS_EXCLUDED) cmake_parse_arguments(PARSE_ARGV 2 arg "" "BASE_DIR" "EXCLUDE")
if(NOT arg_BASE_DIR)
set(arg_BASE_DIR "${current_dir}")
endif()
list(FIND arg_EXCLUDE "${current_dir}" IS_EXCLUDED)
if(IS_EXCLUDED EQUAL -1) if(IS_EXCLUDED EQUAL -1)
file(GLOB COLLECTED_SOURCES cmake_path(RELATIVE_PATH current_dir BASE_DIRECTORY "${arg_BASE_DIR}" OUTPUT_VARIABLE fileset_name)
# normalize file set name
string(REGEX REPLACE "[./\\]" "_" fileset_name "${fileset_name}")
file(GLOB private_source_files
${current_dir}/*.c ${current_dir}/*.c
${current_dir}/*.cc ${current_dir}/*.cc
${current_dir}/*.cpp ${current_dir}/*.cpp)
file(GLOB public_header_files
${current_dir}/*.inl ${current_dir}/*.inl
${current_dir}/*.def
${current_dir}/*.h ${current_dir}/*.h
${current_dir}/*.hh ${current_dir}/*.hh
${current_dir}/*.hpp) ${current_dir}/*.hpp)
list(APPEND ${variable} ${COLLECTED_SOURCES})
target_sources(${target_name} PRIVATE ${private_source_files})
target_sources(${target_name} PUBLIC FILE_SET "headers_${fileset_name}" TYPE HEADERS BASE_DIRS ${current_dir} FILES ${public_header_files})
file(GLOB SUB_DIRECTORIES ${current_dir}/*) file(GLOB SUB_DIRECTORIES ${current_dir}/*)
foreach(SUB_DIRECTORY ${SUB_DIRECTORIES}) foreach(SUB_DIRECTORY ${SUB_DIRECTORIES})
if(IS_DIRECTORY ${SUB_DIRECTORY}) if(IS_DIRECTORY ${SUB_DIRECTORY})
CollectSourceFiles("${SUB_DIRECTORY}" "${variable}" "${ARGN}") CollectAndAddSourceFiles("${target_name}" "${SUB_DIRECTORY}" BASE_DIR ${arg_BASE_DIR} EXCLUDE ${arg_EXCLUDE})
endif() endif()
endforeach() endforeach()
set(${variable} ${${variable}} PARENT_SCOPE)
endif() endif()
endfunction() endfunction()
@@ -52,20 +60,21 @@ endfunction()
# CollectIncludeDirectories( # CollectIncludeDirectories(
# ${CMAKE_CURRENT_SOURCE_DIR} # ${CMAKE_CURRENT_SOURCE_DIR}
# COMMON_PUBLIC_INCLUDES # COMMON_PUBLIC_INCLUDES
# # Exclude # EXCLUDE
# ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders # ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders
# ${CMAKE_CURRENT_SOURCE_DIR}/Platform) # ${CMAKE_CURRENT_SOURCE_DIR}/Platform)
# #
function(CollectIncludeDirectories current_dir variable) function(CollectIncludeDirectories current_dir sources_variable)
list(FIND ARGN "${current_dir}" IS_EXCLUDED) cmake_parse_arguments(PARSE_ARGV 2 arg "" "" "EXCLUDE")
list(FIND arg_EXCLUDE "${current_dir}" IS_EXCLUDED)
if(IS_EXCLUDED EQUAL -1) if(IS_EXCLUDED EQUAL -1)
list(APPEND ${variable} ${current_dir}) list(APPEND ${sources_variable} ${current_dir})
file(GLOB SUB_DIRECTORIES ${current_dir}/*) file(GLOB SUB_DIRECTORIES ${current_dir}/*)
foreach(SUB_DIRECTORY ${SUB_DIRECTORIES}) foreach(SUB_DIRECTORY ${SUB_DIRECTORIES})
if(IS_DIRECTORY ${SUB_DIRECTORY}) if(IS_DIRECTORY ${SUB_DIRECTORY})
CollectIncludeDirectories("${SUB_DIRECTORY}" "${variable}" "${ARGN}") CollectIncludeDirectories("${SUB_DIRECTORY}" "${sources_variable}" EXCLUDE ${arg_EXCLUDE})
endif() endif()
endforeach() endforeach()
set(${variable} ${${variable}} PARENT_SCOPE) set(${sources_variable} ${${sources_variable}} PARENT_SCOPE)
endif() endif()
endfunction() endfunction()
+31 -29
View File
@@ -1,23 +1,7 @@
set(HEADER_FILES add_library(casc STATIC)
src/CascCommon.h
src/CascLib.h
src/CascPort.h
src/common/Array.h
src/common/Common.h
src/common/Csv.h
src/common/Directory.h
src/common/FileStream.h
src/common/FileTree.h
src/common/ListFile.h
src/common/Map.h
src/common/Mime.h
src/common/Path.h
src/common/RootHandler.h
src/common/Sockets.h
src/jenkins/lookup.h
)
set(SRC_FILES target_sources(casc
PRIVATE
src/common/Common.cpp src/common/Common.cpp
src/common/Directory.cpp src/common/Directory.cpp
src/common/Csv.cpp src/common/Csv.cpp
@@ -48,18 +32,36 @@ set(SRC_FILES
src/CascRootFile_Text.cpp src/CascRootFile_Text.cpp
src/CascRootFile_TVFS.cpp src/CascRootFile_TVFS.cpp
src/CascRootFile_OW.cpp src/CascRootFile_OW.cpp
src/CascRootFile_WoW.cpp src/CascRootFile_WoW.cpp)
)
add_library(casc STATIC ${SRC_FILES} ${HEADER_FILES}) target_sources(casc
PUBLIC
FILE_SET HEADERS
BASE_DIRS src
FILES
src/CascLib.h
PRIVATE
FILE_SET casc_private_headers
TYPE HEADERS
BASE_DIRS src
FILES
src/CascCommon.h
src/CascPort.h
src/common/Array.h
src/common/Common.h
src/common/Csv.h
src/common/Directory.h
src/common/FileStream.h
src/common/FileTree.h
src/common/ListFile.h
src/common/Map.h
src/common/Mime.h
src/common/Path.h
src/common/RootHandler.h
src/common/Sockets.h
src/jenkins/lookup.h)
target_include_directories(casc target_compile_definitions(casc PUBLIC CASC_USE_SYSTEM_ZLIB CASCLIB_NO_AUTO_LINK_LIBRARY CASCLIB_NODEBUG)
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src
PRIVATE
${CMAKE_SOURCE_DIR}/dep)
target_compile_definitions(casc PUBLIC __SYS_ZLIB CASCLIB_NO_AUTO_LINK_LIBRARY CASCLIB_NODEBUG)
target_link_libraries(casc target_link_libraries(casc
PRIVATE PRIVATE
+29 -23
View File
@@ -9,31 +9,37 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
set(SFMT_SOURCES add_library(sfmt STATIC)
SFMT.c
SFMT.h
SFMT-alti.h
SFMT-common.h
SFMT-neon.h
SFMT-params.h
SFMT-params607.h
SFMT-params1279.h
SFMT-params2281.h
SFMT-params4253.h
SFMT-params11213.h
SFMT-params19937.h
SFMT-params44497.h
SFMT-params86243.h
SFMT-params132049.h
SFMT-params216091.h
SFMT-sse2.h
SFMT-sse2-msc.h)
add_library(sfmt STATIC ${SFMT_SOURCES}) target_sources(sfmt
PRIVATE
SFMT.c)
target_include_directories(sfmt target_sources(sfmt
INTERFACE PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}) FILE_SET HEADERS
FILES
SFMT.h
SFMT-params.h
SFMT-params607.h
SFMT-params1279.h
SFMT-params2281.h
SFMT-params4253.h
SFMT-params11213.h
SFMT-params19937.h
SFMT-params44497.h
SFMT-params86243.h
SFMT-params132049.h
SFMT-params216091.h
PRIVATE
FILE_SET sfmt_private_headers
TYPE HEADERS
FILES
SFMT-alti.h
SFMT-common.h
SFMT-neon.h
SFMT-sse2.h
SFMT-sse2-msc.h)
# using the standard Mersenne exponent 19937 # using the standard Mersenne exponent 19937
target_compile_definitions(sfmt PUBLIC SFMT_MEXP=19937) target_compile_definitions(sfmt PUBLIC SFMT_MEXP=19937)
+25 -11
View File
@@ -8,18 +8,36 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
file(GLOB_RECURSE sources *.c) add_library(argon2 STATIC)
target_sources(argon2
PRIVATE
argon2/argon2.c
argon2/core.c
argon2/encoding.c
argon2/thread.c
argon2/blake2/blake2b.c)
if(TRINITY_SYSTEM_PROCESSOR MATCHES "x86|amd64") if(TRINITY_SYSTEM_PROCESSOR MATCHES "x86|amd64")
list(REMOVE_ITEM sources target_sources(argon2 PRIVATE argon2/opt.c)
${CMAKE_CURRENT_SOURCE_DIR}/argon2/ref.c)
else() else()
list(REMOVE_ITEM sources target_sources(argon2 PRIVATE argon2/ref.c)
${CMAKE_CURRENT_SOURCE_DIR}/argon2/opt.c)
endif() endif()
add_library(argon2 STATIC target_sources(argon2
${sources}) PUBLIC
FILE_SET HEADERS
FILES
argon2/argon2.h
PRIVATE
FILE_SET argon2_private_headers
TYPE HEADERS
FILES
argon2/core.h
argon2/encoding.h
argon2/thread.h
argon2/blake2/blake2.h
argon2/blake2/blake2-impl.h)
target_compile_definitions(argon2 target_compile_definitions(argon2
PRIVATE PRIVATE
@@ -27,10 +45,6 @@ target_compile_definitions(argon2
set_target_properties(argon2 PROPERTIES LINKER_LANGUAGE CXX) set_target_properties(argon2 PROPERTIES LINKER_LANGUAGE CXX)
target_include_directories(argon2
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(argon2 target_link_libraries(argon2
PRIVATE PRIVATE
trinity-dependency-interface) trinity-dependency-interface)
+122 -89
View File
@@ -1,79 +1,116 @@
if (BUILD_SHARED_LIBS) if (BUILD_SHARED_LIBS)
set(EFSW_CPP_SOURCE add_library(efsw STATIC)
src/efsw/Atomic.hpp
src/efsw/base.hpp
src/efsw/Debug.cpp
src/efsw/Debug.hpp
src/efsw/DirectorySnapshot.cpp
src/efsw/DirectorySnapshot.hpp
src/efsw/DirectorySnapshotDiff.cpp
src/efsw/DirectorySnapshotDiff.hpp
src/efsw/DirWatcherGeneric.cpp
src/efsw/DirWatcherGeneric.hpp
src/efsw/FileInfo.cpp
src/efsw/FileInfo.hpp
src/efsw/FileSystem.cpp
src/efsw/FileSystem.hpp
src/efsw/FileWatcher.cpp
src/efsw/FileWatcherCWrapper.cpp
src/efsw/FileWatcherGeneric.cpp
src/efsw/FileWatcherGeneric.hpp
src/efsw/FileWatcherImpl.cpp
src/efsw/FileWatcherImpl.hpp
src/efsw/Lock.hpp
src/efsw/Log.cpp
src/efsw/Mutex.hpp
src/efsw/sophist.h
src/efsw/String.cpp
src/efsw/String.hpp
src/efsw/System.cpp
src/efsw/System.hpp
src/efsw/Thread.hpp
src/efsw/Utf.hpp
src/efsw/Watcher.cpp
src/efsw/Watcher.hpp
src/efsw/WatcherGeneric.cpp
src/efsw/WatcherGeneric.hpp
src/efsw/platform/platformimpl.hpp
)
if (WIN32) if(WIN32)
list (APPEND EFSW_CPP_SOURCE set(efsw_platform_dir "win")
src/efsw/platform/win/FileSystemImpl.cpp else()
src/efsw/platform/win/FileSystemImpl.hpp set(efsw_platform_dir "posix")
src/efsw/platform/win/SystemImpl.cpp
src/efsw/platform/win/SystemImpl.hpp)
else ()
list (APPEND EFSW_CPP_SOURCE
src/efsw/platform/posix/FileSystemImpl.cpp
src/efsw/platform/posix/FileSystemImpl.hpp
src/efsw/platform/posix/SystemImpl.cpp
src/efsw/platform/posix/SystemImpl.hpp)
endif() endif()
target_sources(efsw
PRIVATE
src/efsw/Debug.cpp
src/efsw/DirectorySnapshot.cpp
src/efsw/DirectorySnapshotDiff.cpp
src/efsw/DirWatcherGeneric.cpp
src/efsw/FileInfo.cpp
src/efsw/FileSystem.cpp
src/efsw/FileWatcher.cpp
src/efsw/FileWatcherCWrapper.cpp
src/efsw/FileWatcherGeneric.cpp
src/efsw/FileWatcherImpl.cpp
src/efsw/Log.cpp
src/efsw/String.cpp
src/efsw/System.cpp
src/efsw/Watcher.cpp
src/efsw/WatcherGeneric.cpp
src/efsw/platform/${efsw_platform_dir}/FileSystemImpl.cpp
src/efsw/platform/${efsw_platform_dir}/SystemImpl.cpp)
target_sources(efsw
PUBLIC
FILE_SET HEADERS
BASE_DIRS include
FILES
include/efsw/efsw.h
include/efsw/efsw.hpp)
target_sources(efsw
PRIVATE
FILE_SET efsw_private_headers
TYPE HEADERS
BASE_DIRS src
FILES
src/efsw/Atomic.hpp
src/efsw/base.hpp
src/efsw/Debug.hpp
src/efsw/DirectorySnapshot.hpp
src/efsw/DirectorySnapshotDiff.hpp
src/efsw/DirWatcherGeneric.hpp
src/efsw/FileInfo.hpp
src/efsw/FileSystem.hpp
src/efsw/FileWatcherGeneric.hpp
src/efsw/FileWatcherImpl.hpp
src/efsw/Lock.hpp
src/efsw/Mutex.hpp
src/efsw/sophist.h
src/efsw/String.hpp
src/efsw/System.hpp
src/efsw/Thread.hpp
src/efsw/Utf.hpp
src/efsw/Watcher.hpp
src/efsw/WatcherGeneric.hpp
src/efsw/platform/platformimpl.hpp
src/efsw/platform/${efsw_platform_dir}/FileSystemImpl.hpp
src/efsw/platform/${efsw_platform_dir}/SystemImpl.hpp)
if (APPLE) if (APPLE)
list (APPEND EFSW_CPP_SOURCE target_sources(efsw
src/efsw/FileWatcherFSEvents.cpp PRIVATE
src/efsw/FileWatcherFSEvents.hpp src/efsw/FileWatcherFSEvents.cpp
src/efsw/FileWatcherKqueue.cpp src/efsw/FileWatcherKqueue.cpp
src/efsw/FileWatcherKqueue.hpp src/efsw/WatcherFSEvents.cpp
src/efsw/WatcherFSEvents.cpp src/efsw/WatcherKqueue.cpp)
src/efsw/WatcherFSEvents.hpp target_sources(efsw
src/efsw/WatcherKqueue.cpp PRIVATE
src/efsw/WatcherKqueue.hpp) FILE_SET efsw_private_headers
set(OPTIONAL_LINK_LIBRARIES "-framework CoreFoundation" "-framework CoreServices") TYPE HEADERS
BASE_DIRS src
FILES
src/efsw/FileWatcherFSEvents.hpp
src/efsw/FileWatcherKqueue.hpp
src/efsw/WatcherFSEvents.hpp
src/efsw/WatcherKqueue.hpp)
target_link_libraries(efsw
PRIVATE
$<LINK_LIBRARY:FRAMEWORK,CoreFoundation>
$<LINK_LIBRARY:FRAMEWORK,CoreServices>)
elseif (WIN32) elseif (WIN32)
list (APPEND EFSW_CPP_SOURCE target_sources(efsw
src/efsw/FileWatcherWin32.cpp PRIVATE
src/efsw/FileWatcherWin32.hpp src/efsw/FileWatcherWin32.cpp
src/efsw/WatcherWin32.cpp src/efsw/WatcherWin32.cpp)
src/efsw/WatcherWin32.hpp) target_sources(efsw
PRIVATE
FILE_SET efsw_private_headers
TYPE HEADERS
BASE_DIRS src
FILES
src/efsw/FileWatcherWin32.hpp
src/efsw/WatcherWin32.hpp)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
list (APPEND EFSW_CPP_SOURCE target_sources(efsw
src/efsw/FileWatcherInotify.cpp PRIVATE
src/efsw/FileWatcherInotify.hpp src/efsw/FileWatcherInotify.cpp
src/efsw/WatcherInotify.cpp src/efsw/WatcherInotify.cpp)
src/efsw/WatcherInotify.hpp) target_sources(efsw
PRIVATE
FILE_SET efsw_private_headers
TYPE HEADERS
BASE_DIRS src
FILES
src/efsw/FileWatcherInotify.hpp
src/efsw/WatcherInotify.hpp)
find_path(EFSW_INOTIFY_H find_path(EFSW_INOTIFY_H
NAMES NAMES
sys/inotify.h sys/inotify.h
@@ -83,34 +120,30 @@ if (BUILD_SHARED_LIBS)
list (APPEND EFSW_CPP_SOURCE list (APPEND EFSW_CPP_SOURCE
src/efsw/inotify-nosys.h src/efsw/inotify-nosys.h
) )
set(OPTIONAL_COMPILE_DEFINITIONS "-DEFSW_INOTIFY_NOSYS") target_compile_definitions(efsw
PRIVATE
EFSW_INOTIFY_NOSYS)
endif() endif()
elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
list (APPEND EFSW_CPP_SOURCE target_sources(efsw
src/efsw/FileWatcherKqueue.cpp PRIVATE
src/efsw/FileWatcherKqueue.hpp src/efsw/FileWatcherKqueue.cpp
src/efsw/WatcherKqueue.cpp src/efsw/WatcherKqueue.cpp)
src/efsw/WatcherKqueue.hpp) target_sources(efsw
PRIVATE
FILE_SET efsw_private_headers
TYPE HEADERS
BASE_DIRS src
FILES
src/efsw/FileWatcherKqueue.hpp
src/efsw/WatcherKqueue.hpp)
endif() endif()
add_library(efsw STATIC ${EFSW_CPP_SOURCE})
target_include_directories(efsw
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src)
target_compile_definitions(efsw
PRIVATE
${OPTIONAL_COMPILE_DEFINITIONS})
target_link_libraries(efsw target_link_libraries(efsw
PRIVATE PRIVATE
trinity-dependency-interface trinity-dependency-interface
PUBLIC PUBLIC
threads threads)
${OPTIONAL_LINK_LIBRARIES})
set_target_properties(efsw set_target_properties(efsw
PROPERTIES PROPERTIES
+24 -23
View File
@@ -8,31 +8,32 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
set(FMT_HEADERS add_library(fmt STATIC)
include/fmt/args.h
include/fmt/base.h
include/fmt/chrono.h
include/fmt/color.h
include/fmt/compile.h
include/fmt/core.h
include/fmt/format.h
include/fmt/format-inl.h
include/fmt/os.h
include/fmt/ostream.h
include/fmt/printf.h
include/fmt/ranges.h
include/fmt/std.h
include/fmt/xchar.h)
set(FMT_SOURCES target_sources(fmt
src/format.cc
src/os.cc)
add_library(fmt STATIC ${FMT_SOURCES} ${FMT_HEADERS})
target_include_directories(fmt
PUBLIC PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include) FILE_SET HEADERS
BASE_DIRS include
FILES
include/fmt/args.h
include/fmt/base.h
include/fmt/chrono.h
include/fmt/color.h
include/fmt/compile.h
include/fmt/core.h
include/fmt/format.h
include/fmt/format-inl.h
include/fmt/os.h
include/fmt/ostream.h
include/fmt/printf.h
include/fmt/ranges.h
include/fmt/std.h
include/fmt/xchar.h)
target_sources(fmt
PRIVATE
src/format.cc
src/os.cc)
target_link_libraries(fmt target_link_libraries(fmt
PRIVATE PRIVATE
+62 -48
View File
@@ -8,57 +8,71 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
set(g3dlib_STAT_SRCS add_library(g3dlib STATIC)
source/AABox.cpp
source/Any.cpp
source/AnyTableReader.cpp
source/BinaryFormat.cpp
source/BinaryInput.cpp
source/BinaryOutput.cpp
source/Box.cpp
source/Capsule.cpp
source/CollisionDetection.cpp
source/CoordinateFrame.cpp
source/Crypto.cpp
source/Cylinder.cpp
source/debugAssert.cpp
source/FileSystem.cpp
source/fileutils.cpp
source/format.cpp
source/g3dfnmatch.cpp
source/g3dmath.cpp
source/GThread.cpp
source/Line.cpp
source/LineSegment.cpp
source/Log.cpp
source/Matrix3.cpp
source/Matrix4.cpp
source/MemoryManager.cpp
source/PhysicsFrame.cpp
source/Plane.cpp
source/prompt.cpp
source/Quat.cpp
source/Random.cpp
source/Ray.cpp
source/RegistryUtil.cpp
source/Sphere.cpp
source/stringutils.cpp
source/System.cpp
source/TextInput.cpp
source/TextOutput.cpp
source/Triangle.cpp
source/uint128.cpp
source/UprightFrame.cpp
source/Vector2.cpp
source/Vector3.cpp
source/Vector4.cpp
)
add_library(g3dlib STATIC ${g3dlib_STAT_SRCS}) target_sources(g3dlib
PRIVATE
source/AABox.cpp
source/Any.cpp
source/AnyTableReader.cpp
source/BinaryFormat.cpp
source/BinaryInput.cpp
source/BinaryOutput.cpp
source/Box.cpp
source/Capsule.cpp
source/CollisionDetection.cpp
source/CoordinateFrame.cpp
source/Crypto.cpp
source/Cylinder.cpp
source/debugAssert.cpp
source/FileSystem.cpp
source/fileutils.cpp
source/format.cpp
source/g3dfnmatch.cpp
source/g3dmath.cpp
source/GThread.cpp
source/Line.cpp
source/LineSegment.cpp
source/Log.cpp
source/Matrix3.cpp
source/Matrix4.cpp
source/MemoryManager.cpp
source/PhysicsFrame.cpp
source/Plane.cpp
source/prompt.cpp
source/Quat.cpp
source/Random.cpp
source/Ray.cpp
source/RegistryUtil.cpp
source/Sphere.cpp
source/stringutils.cpp
source/System.cpp
source/TextInput.cpp
source/TextOutput.cpp
source/Triangle.cpp
source/uint128.cpp
source/UprightFrame.cpp
source/Vector2.cpp
source/Vector3.cpp
source/Vector4.cpp)
target_include_directories(g3dlib target_sources(g3dlib
PUBLIC PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include) FILE_SET HEADERS
BASE_DIRS include
FILES
include/G3D/AABox.h
include/G3D/BoundsTrait.h
include/G3D/Box.h
include/G3D/CoordinateFrame.h
include/G3D/g3dmath.h
include/G3D/Matrix3.h
include/G3D/Matrix4.h
include/G3D/Plane.h
include/G3D/Quat.h
include/G3D/Ray.h
include/G3D/Vector3.h
include/G3D/Vector4.h)
if((CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT NOJEM) OR TSAN) if((CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT NOJEM) OR TSAN)
target_compile_definitions(g3dlib target_compile_definitions(g3dlib
+14 -6
View File
@@ -8,16 +8,24 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
file(GLOB sources *.cpp *.c *.h) add_library(gsoap STATIC)
add_library(gsoap STATIC ${sources}) target_sources(gsoap
PRIVATE
soapC.cpp
soapServer.cpp
stdsoap2.cpp)
target_sources(gsoap
PUBLIC
FILE_SET HEADERS
FILES
soapH.h
soapStub.h
stdsoap2.h)
set_target_properties(gsoap PROPERTIES LINKER_LANGUAGE CXX) set_target_properties(gsoap PROPERTIES LINKER_LANGUAGE CXX)
target_include_directories(gsoap
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(gsoap target_compile_definitions(gsoap
PUBLIC PUBLIC
WITH_OPENSSL) WITH_OPENSSL)
+17 -13
View File
@@ -8,25 +8,29 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
file(GLOB RECURSE sources *.cpp *.c *.h) add_library(openssl_ed25519 SHARED)
add_library(openssl_ed25519 target_sources(openssl_ed25519
SHARED PRIVATE
curve25519.c curve25519.c)
ed25519/ed25519.h
ec_lcl.h target_sources(openssl_ed25519
internal/refcount.h) PUBLIC
FILE_SET HEADERS
FILES
ed25519/ed25519.h
PRIVATE
FILE_SET openssl_ed25519_private_headers
TYPE HEADERS
FILES
ec_lcl.h
internal/refcount.h)
set_target_properties(openssl_ed25519 PROPERTIES LINKER_LANGUAGE CXX) set_target_properties(openssl_ed25519 PROPERTIES LINKER_LANGUAGE CXX)
target_include_directories(openssl_ed25519
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(openssl_ed25519 target_compile_definitions(openssl_ed25519
PRIVATE PRIVATE
OPENSSL_ED25519_EXPORT OPENSSL_ED25519_EXPORT)
)
target_link_libraries(openssl_ed25519 target_link_libraries(openssl_ed25519
PRIVATE PRIVATE
+90 -53
View File
@@ -8,61 +8,98 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
set(protobuf_STAT_SRCS add_library(protobuf)
src/google/protobuf/compiler/importer.cc
src/google/protobuf/compiler/parser.cc
src/google/protobuf/descriptor.cc
src/google/protobuf/descriptor.pb.cc
src/google/protobuf/descriptor_database.cc
src/google/protobuf/dynamic_message.cc
src/google/protobuf/extension_set.cc
src/google/protobuf/extension_set_heavy.cc
src/google/protobuf/generated_message_reflection.cc
src/google/protobuf/generated_message_util.cc
src/google/protobuf/io/coded_stream.cc
src/google/protobuf/io/gzip_stream.cc
src/google/protobuf/io/printer.cc
src/google/protobuf/io/strtod.cc
src/google/protobuf/io/tokenizer.cc
src/google/protobuf/io/zero_copy_stream.cc
src/google/protobuf/io/zero_copy_stream_impl.cc
src/google/protobuf/io/zero_copy_stream_impl_lite.cc
src/google/protobuf/message.cc
src/google/protobuf/message_lite.cc
src/google/protobuf/reflection_ops.cc
src/google/protobuf/repeated_field.cc
src/google/protobuf/service.cc
src/google/protobuf/stubs/common.cc
src/google/protobuf/stubs/once.cc
src/google/protobuf/stubs/stringprintf.cc
src/google/protobuf/stubs/structurally_valid.cc
src/google/protobuf/stubs/strutil.cc
src/google/protobuf/stubs/substitute.cc
src/google/protobuf/text_format.cc
src/google/protobuf/unknown_field_set.cc
src/google/protobuf/wire_format.cc
src/google/protobuf/wire_format_lite.cc
)
if (MSVC) target_sources(protobuf
set(protobuf_STAT_SRCS
${protobuf_STAT_SRCS}
src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc
)
else()
set(protobuf_STAT_SRCS
${protobuf_STAT_SRCS}
src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc
)
endif()
add_library(protobuf ${protobuf_STAT_SRCS})
target_include_directories(protobuf
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src
PRIVATE PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/tc_custom) src/google/protobuf/compiler/importer.cc
src/google/protobuf/compiler/parser.cc
src/google/protobuf/descriptor.cc
src/google/protobuf/descriptor.pb.cc
src/google/protobuf/descriptor_database.cc
src/google/protobuf/dynamic_message.cc
src/google/protobuf/extension_set.cc
src/google/protobuf/extension_set_heavy.cc
src/google/protobuf/generated_message_reflection.cc
src/google/protobuf/generated_message_util.cc
src/google/protobuf/io/coded_stream.cc
src/google/protobuf/io/gzip_stream.cc
src/google/protobuf/io/printer.cc
src/google/protobuf/io/strtod.cc
src/google/protobuf/io/tokenizer.cc
src/google/protobuf/io/zero_copy_stream.cc
src/google/protobuf/io/zero_copy_stream_impl.cc
src/google/protobuf/io/zero_copy_stream_impl_lite.cc
src/google/protobuf/message.cc
src/google/protobuf/message_lite.cc
src/google/protobuf/reflection_ops.cc
src/google/protobuf/repeated_field.cc
src/google/protobuf/service.cc
src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc
src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc
src/google/protobuf/stubs/common.cc
src/google/protobuf/stubs/once.cc
src/google/protobuf/stubs/stringprintf.cc
src/google/protobuf/stubs/structurally_valid.cc
src/google/protobuf/stubs/strutil.cc
src/google/protobuf/stubs/substitute.cc
src/google/protobuf/text_format.cc
src/google/protobuf/unknown_field_set.cc
src/google/protobuf/wire_format.cc
src/google/protobuf/wire_format_lite.cc)
target_sources(protobuf
PUBLIC
FILE_SET HEADERS
BASE_DIRS src
FILES
src/google/protobuf/compiler/importer.h
src/google/protobuf/compiler/parser.h
src/google/protobuf/descriptor_database.h
src/google/protobuf/descriptor.h
src/google/protobuf/descriptor.pb.h
src/google/protobuf/dynamic_message.h
src/google/protobuf/extension_set.h
src/google/protobuf/generated_enum_reflection.h
src/google/protobuf/generated_message_reflection.h
src/google/protobuf/generated_message_util.h
src/google/protobuf/io/coded_stream.h
src/google/protobuf/io/coded_stream_inl.h
src/google/protobuf/io/gzip_stream.h
src/google/protobuf/io/printer.h
src/google/protobuf/io/strtod.h
src/google/protobuf/io/tokenizer.h
src/google/protobuf/io/zero_copy_stream.h
src/google/protobuf/io/zero_copy_stream_impl.h
src/google/protobuf/io/zero_copy_stream_impl_lite.h
src/google/protobuf/message.h
src/google/protobuf/message_lite.h
src/google/protobuf/reflection_ops.h
src/google/protobuf/repeated_field.h
src/google/protobuf/service.h
src/google/protobuf/stubs/atomicops.h
src/google/protobuf/stubs/common.h
src/google/protobuf/stubs/hash.h
src/google/protobuf/stubs/map_util.h
src/google/protobuf/stubs/once.h
src/google/protobuf/stubs/platform_macros.h
src/google/protobuf/stubs/stl_util.h
src/google/protobuf/stubs/stringprintf.h
src/google/protobuf/stubs/strutil.h
src/google/protobuf/stubs/substitute.h
src/google/protobuf/stubs/template_util.h
src/google/protobuf/stubs/type_traits.h
src/google/protobuf/text_format.h
src/google/protobuf/unknown_field_set.h
src/google/protobuf/wire_format.h
src/google/protobuf/wire_format_lite.h
src/google/protobuf/wire_format_lite_inl.h
PRIVATE
FILE_SET protobuf_private_headers
TYPE HEADERS
BASE_DIRS tc_custom
FILES
tc_custom/config.h)
target_link_libraries(protobuf target_link_libraries(protobuf
PRIVATE PRIVATE
+19 -10
View File
@@ -8,27 +8,36 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
set(Detour_STAT_SRCS add_library(Detour STATIC)
target_sources(Detour
PRIVATE
Source/DetourAlloc.cpp Source/DetourAlloc.cpp
Source/DetourAssert.cpp Source/DetourAssert.cpp
Source/DetourCommon.cpp Source/DetourCommon.cpp
Source/DetourNavMesh.cpp Source/DetourNavMesh.cpp
Source/DetourNavMeshBuilder.cpp Source/DetourNavMeshBuilder.cpp
Source/DetourNavMeshQuery.cpp Source/DetourNavMeshQuery.cpp
Source/DetourNode.cpp Source/DetourNode.cpp)
)
add_library(Detour STATIC ${Detour_STAT_SRCS}) target_sources(Detour
target_include_directories(Detour
PUBLIC PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/Include) FILE_SET HEADERS
BASE_DIRS Include
FILES
Include/DetourAlloc.h
Include/DetourAssert.h
Include/DetourCommon.h
Include/DetourMath.h
Include/DetourNavMeshBuilder.h
Include/DetourNavMesh.h
Include/DetourNavMeshQuery.h
Include/DetourNode.h
Include/DetourStatus.h)
target_link_libraries(Detour target_link_libraries(Detour
PRIVATE PRIVATE
trinity-dependency-interface trinity-dependency-interface)
PUBLIC
zlib)
set_target_properties(Detour set_target_properties(Detour
PROPERTIES PROPERTIES
+14 -11
View File
@@ -8,10 +8,13 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
set(Recast_STAT_SRCS add_library(Recast STATIC)
target_sources(Recast
PRIVATE
Source/Recast.cpp Source/Recast.cpp
Source/RecastAlloc.cpp Source/RecastAlloc.cpp
Source/RecastAssert.cpp Source/RecastAssert.cpp
Source/RecastArea.cpp Source/RecastArea.cpp
Source/RecastContour.cpp Source/RecastContour.cpp
Source/RecastFilter.cpp Source/RecastFilter.cpp
@@ -19,20 +22,20 @@ set(Recast_STAT_SRCS
Source/RecastMesh.cpp Source/RecastMesh.cpp
Source/RecastMeshDetail.cpp Source/RecastMeshDetail.cpp
Source/RecastRasterization.cpp Source/RecastRasterization.cpp
Source/RecastRegion.cpp Source/RecastRegion.cpp)
)
add_library(Recast STATIC ${Recast_STAT_SRCS}) target_sources(Recast
target_include_directories(Recast
PUBLIC PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/Include) FILE_SET HEADERS
BASE_DIRS Include
FILES
Include/RecastAlloc.h
Include/RecastAssert.h
Include/Recast.h)
target_link_libraries(Recast target_link_libraries(Recast
PRIVATE PRIVATE
trinity-dependency-interface trinity-dependency-interface)
PUBLIC
zlib)
set_target_properties(Recast set_target_properties(Recast
PROPERTIES PROPERTIES
+34 -30
View File
@@ -22,40 +22,44 @@ if(UNIX)
"${ZLIB_INCLUDE_DIRS}") "${ZLIB_INCLUDE_DIRS}")
else() else()
# Use the bundled source on windows # Use the bundled source on windows
SET(zlib_STAT_SRCS add_library(zlib STATIC)
adler32.c
compress.c
crc32.c
crc32.h
deflate.c
deflate.h
gzguts.h
infback.c
inffast.c
inffast.h
inffixed.h
inflate.c
inflate.h
inftrees.c
inftrees.h
trees.c
trees.h
uncompr.c
zconf.h
zlib.h
zutil.c
zutil.h
)
add_library(zlib STATIC target_sources(zlib
${zlib_STAT_SRCS}) PRIVATE
adler32.c
compress.c
crc32.c
deflate.c
infback.c
inffast.c
inflate.c
inftrees.c
trees.c
uncompr.c
zutil.c)
target_sources(zlib
PUBLIC
FILE_SET HEADERS
FILES
zlib.h
PRIVATE
FILE_SET zlib_private_headers
TYPE HEADERS
FILES
crc32.h
deflate.h
gzguts.h
inffast.h
inffixed.h
inflate.h
inftrees.h
trees.h
zconf.h
zutil.h)
set_target_properties(zlib PROPERTIES LINKER_LANGUAGE CXX) set_target_properties(zlib PROPERTIES LINKER_LANGUAGE CXX)
target_include_directories(zlib
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(zlib target_link_libraries(zlib
PRIVATE PRIVATE
trinity-dependency-interface) trinity-dependency-interface)
+14 -37
View File
@@ -8,10 +8,14 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CollectSourceFiles( GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
add_library(common)
CollectAndAddSourceFiles(
common
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES EXCLUDE
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/Debugging/Windows ${CMAKE_CURRENT_SOURCE_DIR}/Debugging/Windows
${CMAKE_CURRENT_SOURCE_DIR}/Platform ${CMAKE_CURRENT_SOURCE_DIR}/Platform
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders
@@ -19,43 +23,20 @@ CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}/network) ${CMAKE_CURRENT_SOURCE_DIR}/network)
if(WIN32) if(WIN32)
CollectSourceFiles( CollectAndAddSourceFiles(
common
${CMAKE_CURRENT_SOURCE_DIR}/Debugging/Windows ${CMAKE_CURRENT_SOURCE_DIR}/Debugging/Windows
WINDOWS_DEBUGGING_SOURCES) BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
list(APPEND PRIVATE_SOURCES CollectAndAddSourceFiles(
${WINDOWS_DEBUGGING_SOURCES}) common
CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}/Platform/Windows ${CMAKE_CURRENT_SOURCE_DIR}/Platform/Windows
WINDOWS_PLATFORM_SOURCES) BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
list(APPEND PRIVATE_SOURCES
${WINDOWS_PLATFORM_SOURCES})
unset(WINDOWS_DEBUGGING_SOURCES)
unset(WINDOWS_PLATFORM_SOURCES)
endif() endif()
if(USE_COREPCH)
set(PRIVATE_PCH_HEADER PrecompiledHeaders/commonPCH.h)
endif(USE_COREPCH)
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
add_library(common
${PRIVATE_SOURCES}
)
CollectIncludeDirectories(
${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC_INCLUDES
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders
${CMAKE_CURRENT_SOURCE_DIR}/mmaps_common
${CMAKE_CURRENT_SOURCE_DIR}/network)
target_include_directories(common target_include_directories(common
PUBLIC PUBLIC
# Provide the binary dir for all child targets # Provide the binary dir for all child targets
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
${PUBLIC_INCLUDES}
PRIVATE PRIVATE
${CMAKE_CURRENT_BINARY_DIR}) ${CMAKE_CURRENT_BINARY_DIR})
@@ -98,12 +79,8 @@ endif()
# Generate precompiled header # Generate precompiled header
if(USE_COREPCH) if(USE_COREPCH)
add_cxx_pch(common ${PRIVATE_PCH_HEADER}) add_cxx_pch(common PrecompiledHeaders/commonPCH.h)
endif() endif()
unset(PRIVATE_SOURCES)
unset(PRIVATE_PCH_HEADER)
unset(PUBLIC_INCLUDES)
add_subdirectory(mmaps_common) add_subdirectory(mmaps_common)
add_subdirectory(network) add_subdirectory(network)
+4 -13
View File
@@ -8,18 +8,13 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES)
GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
CollectIncludeDirectories( add_library(mmaps_common)
${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC_INCLUDES
)
add_library(mmaps_common ${PRIVATE_SOURCES}) CollectAndAddSourceFiles(
mmaps_common
${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(mmaps_common target_link_libraries(mmaps_common
PRIVATE PRIVATE
@@ -29,10 +24,6 @@ target_link_libraries(mmaps_common
Recast Recast
Detour) Detour)
target_include_directories(mmaps_common
PUBLIC
${PUBLIC_INCLUDES})
set_target_properties(mmaps_common set_target_properties(mmaps_common
PROPERTIES PROPERTIES
COMPILE_WARNING_AS_ERROR ${WITH_WARNINGS_AS_ERRORS} COMPILE_WARNING_AS_ERROR ${WITH_WARNINGS_AS_ERRORS}
+5 -10
View File
@@ -8,22 +8,17 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES)
GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
add_library(network add_library(network)
${PRIVATE_SOURCES})
CollectIncludeDirectories( CollectAndAddSourceFiles(
network
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC_INCLUDES) EXCLUDE
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
target_include_directories(network target_include_directories(network
PUBLIC
${PUBLIC_INCLUDES}
PRIVATE PRIVATE
${CMAKE_CURRENT_BINARY_DIR}) ${CMAKE_CURRENT_BINARY_DIR})
+10 -26
View File
@@ -10,29 +10,21 @@
########### bnetserver ############### ########### bnetserver ###############
CollectSourceFiles( GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
add_executable(bnetserver)
CollectAndAddSourceFiles(
bnetserver
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES EXCLUDE
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders) ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
if (WIN32) if (WIN32)
if (MSVC) if (MSVC)
list(APPEND PRIVATE_SOURCES bnetserver.rc) target_sources(bnetserver PRIVATE bnetserver.rc)
endif() endif()
endif() else()
if (USE_COREPCH)
set(PRIVATE_PCH_HEADER PrecompiledHeaders/bnetPCH.h)
endif()
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
add_executable(bnetserver
${PRIVATE_SOURCES}
)
if (NOT WIN32)
target_compile_definitions(bnetserver PRIVATE target_compile_definitions(bnetserver PRIVATE
_TRINITY_BNET_CONFIG="${CONF_DIR}/bnetserver.conf" _TRINITY_BNET_CONFIG="${CONF_DIR}/bnetserver.conf"
_TRINITY_BNET_CONFIG_DIR="${CONF_DIR}/bnetserver.conf.d" _TRINITY_BNET_CONFIG_DIR="${CONF_DIR}/bnetserver.conf.d"
@@ -45,15 +37,7 @@ target_link_libraries(bnetserver
PUBLIC PUBLIC
shared) shared)
CollectIncludeDirectories(
${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC_INCLUDES
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
target_include_directories(bnetserver target_include_directories(bnetserver
PUBLIC
${PUBLIC_INCLUDES}
PRIVATE PRIVATE
${CMAKE_CURRENT_BINARY_DIR}) ${CMAKE_CURRENT_BINARY_DIR})
@@ -92,5 +76,5 @@ endif()
# Generate precompiled header # Generate precompiled header
if (USE_COREPCH) if (USE_COREPCH)
add_cxx_pch(bnetserver ${PRIVATE_PCH_HEADER}) add_cxx_pch(bnetserver PrecompiledHeaders/bnetPCH.h)
endif() endif()
+5 -19
View File
@@ -8,31 +8,17 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
if(USE_COREPCH)
set(PRIVATE_PCH_HEADER PrecompiledHeaders/databasePCH.h)
endif()
GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
add_library(database add_library(database)
${PRIVATE_SOURCES}
)
CollectIncludeDirectories( CollectAndAddSourceFiles(
database
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC_INCLUDES EXCLUDE
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders) ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
target_include_directories(database target_include_directories(database
PUBLIC
${PUBLIC_INCLUDES}
PRIVATE PRIVATE
${CMAKE_CURRENT_BINARY_DIR}) ${CMAKE_CURRENT_BINARY_DIR})
@@ -63,5 +49,5 @@ endif()
# Generate precompiled header # Generate precompiled header
if(USE_COREPCH) if(USE_COREPCH)
add_cxx_pch(database ${PRIVATE_PCH_HEADER}) add_cxx_pch(database PrecompiledHeaders/databasePCH.h)
endif() endif()
+9 -14
View File
@@ -8,22 +8,12 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
if(USE_COREPCH)
set(PRIVATE_PCH_HEADER PrecompiledHeaders/gamePCH.h)
endif()
GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
CollectIncludeDirectories( CollectIncludeDirectories(
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC_INCLUDES PUBLIC_INCLUDES
# Exclude EXCLUDE
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders) ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
# Provide an interface target for the game project to allow # Provide an interface target for the game project to allow
@@ -39,8 +29,13 @@ target_link_libraries(game-interface
shared shared
mmaps_common) mmaps_common)
add_library(game add_library(game)
${PRIVATE_SOURCES})
CollectAndAddSourceFiles(
game
${CMAKE_CURRENT_SOURCE_DIR}
EXCLUDE
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
target_include_directories(game target_include_directories(game
PRIVATE PRIVATE
@@ -73,5 +68,5 @@ endif()
# Generate precompiled header # Generate precompiled header
if(USE_COREPCH) if(USE_COREPCH)
add_cxx_pch(game ${PRIVATE_PCH_HEADER}) add_cxx_pch(game PrecompiledHeaders/gamePCH.h)
endif() endif()
+6 -22
View File
@@ -8,33 +8,17 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
if (USE_COREPCH)
set(PRIVATE_PCH_HEADER PrecompiledHeaders/protoPCH.h)
endif()
GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
add_library(proto add_library(proto)
${PRIVATE_SOURCES}
)
CollectIncludeDirectories( CollectAndAddSourceFiles(
proto
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC_INCLUDES EXCLUDE
# Exclude ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders
${CMAKE_CURRENT_SOURCE_DIR}/Client/api
${CMAKE_CURRENT_SOURCE_DIR}/Client/global_extensions)
target_include_directories(proto target_include_directories(proto
PUBLIC
${PUBLIC_INCLUDES}
PRIVATE PRIVATE
${CMAKE_CURRENT_BINARY_DIR}) ${CMAKE_CURRENT_BINARY_DIR})
@@ -66,5 +50,5 @@ endif()
# Generate precompiled header # Generate precompiled header
if (USE_COREPCH) if (USE_COREPCH)
add_cxx_pch(proto ${PRIVATE_PCH_HEADER}) add_cxx_pch(proto PrecompiledHeaders/protoPCH.h)
endif() endif()
+17 -25
View File
@@ -88,13 +88,10 @@ foreach(GRAPH_KEY ${GRAPH_KEYS})
message(" |") message(" |")
endforeach() endforeach()
# Base sources which are used by every script project
if(USE_SCRIPTPCH)
set(PRIVATE_PCH_HEADER ScriptPCH.h)
endif()
GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
add_library(scripts STATIC)
# Configures the scriptloader with the given name and stores the output in the LOADER_OUT variable. # Configures the scriptloader with the given name and stores the output in the LOADER_OUT variable.
# It is possible to expose multiple subdirectories from the same scriptloader through passing # It is possible to expose multiple subdirectories from the same scriptloader through passing
# it to the variable arguments # it to the variable arguments
@@ -145,32 +142,28 @@ foreach(SCRIPT_MODULE ${SCRIPT_MODULE_LIST})
# Add the module name to STATIC_SCRIPT_MODULES # Add the module name to STATIC_SCRIPT_MODULES
list(APPEND STATIC_SCRIPT_MODULES ${SCRIPT_MODULE}) list(APPEND STATIC_SCRIPT_MODULES ${SCRIPT_MODULE})
# Add the module content to the whole static module # Add the module content to the whole static module
CollectSourceFiles(${SCRIPT_MODULE_PATH} PRIVATE_SOURCES) CollectAndAddSourceFiles(scripts ${SCRIPT_MODULE_PATH})
endif() endif()
elseif(${SCRIPT_MODULE_VARIABLE} STREQUAL "dynamic") elseif(${SCRIPT_MODULE_VARIABLE} STREQUAL "dynamic")
# Generate an own dynamic module which is loadable on runtime # Generate an own dynamic module which is loadable on runtime
# Add the module content to the whole static module
unset(SCRIPT_MODULE_PRIVATE_SOURCES)
CollectSourceFiles(${SCRIPT_MODULE_PATH} SCRIPT_MODULE_PRIVATE_SOURCES)
# Configure the scriptloader # Configure the scriptloader
ConfigureScriptLoader(${SCRIPT_MODULE} SCRIPT_MODULE_PRIVATE_SCRIPTLOADER ON ${SCRIPT_MODULE}) ConfigureScriptLoader(${SCRIPT_MODULE} SCRIPT_MODULE_PRIVATE_SCRIPTLOADER ON ${SCRIPT_MODULE})
GetProjectNameOfScriptModule(${SCRIPT_MODULE} SCRIPT_MODULE_PROJECT_NAME) GetProjectNameOfScriptModule(${SCRIPT_MODULE} SCRIPT_MODULE_PROJECT_NAME)
# Add the module name to DYNAMIC_SCRIPT_MODULES # Add the module name to DYNAMIC_SCRIPT_MODULES
list(APPEND DYNAMIC_SCRIPT_MODULE_PROJECTS ${SCRIPT_MODULE_PROJECT_NAME}) list(APPEND DYNAMIC_SCRIPT_MODULE_PROJECTS ${SCRIPT_MODULE_PROJECT_NAME})
# Create the script module project # Create the script module project
add_library(${SCRIPT_MODULE_PROJECT_NAME} SHARED add_library(${SCRIPT_MODULE_PROJECT_NAME} SHARED)
${SCRIPT_MODULE_PRIVATE_SOURCES} CollectAndAddSourceFiles(${SCRIPT_MODULE_PROJECT_NAME} ${SCRIPT_MODULE_PATH})
${SCRIPT_MODULE_PRIVATE_SCRIPTLOADER}) target_sources(${SCRIPT_MODULE_PROJECT_NAME}
PUBLIC
FILE_SET HEADERS FILES ScriptLoader.h)
target_link_libraries(${SCRIPT_MODULE_PROJECT_NAME} target_link_libraries(${SCRIPT_MODULE_PROJECT_NAME}
PRIVATE PRIVATE
trinity-core-interface trinity-core-interface
PUBLIC PUBLIC
game) game)
target_include_directories(${SCRIPT_MODULE_PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR})
set_target_properties(${SCRIPT_MODULE_PROJECT_NAME} set_target_properties(${SCRIPT_MODULE_PROJECT_NAME}
PROPERTIES PROPERTIES
COMPILE_WARNING_AS_ERROR ${WITH_WARNINGS_AS_ERRORS} COMPILE_WARNING_AS_ERROR ${WITH_WARNINGS_AS_ERRORS}
@@ -203,10 +196,13 @@ set(WORLDSERVER_DYNAMIC_SCRIPT_MODULES_DEPENDENCIES ${DYNAMIC_SCRIPT_MODULE_PROJ
ConfigureScriptLoader("static" SCRIPT_MODULE_PRIVATE_SCRIPTLOADER OFF ${STATIC_SCRIPT_MODULES}) ConfigureScriptLoader("static" SCRIPT_MODULE_PRIVATE_SCRIPTLOADER OFF ${STATIC_SCRIPT_MODULES})
add_library(scripts STATIC target_sources(scripts
ScriptLoader.h PRIVATE
${SCRIPT_MODULE_PRIVATE_SCRIPTLOADER} ${SCRIPT_MODULE_PRIVATE_SCRIPTLOADER})
${PRIVATE_SOURCES})
target_sources(scripts
PUBLIC
FILE_SET HEADERS FILES ScriptLoader.h)
target_link_libraries(scripts target_link_libraries(scripts
PRIVATE PRIVATE
@@ -214,10 +210,6 @@ target_link_libraries(scripts
PUBLIC PUBLIC
game-interface) game-interface)
target_include_directories(scripts
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR})
set_target_properties(scripts set_target_properties(scripts
PROPERTIES PROPERTIES
COMPILE_WARNING_AS_ERROR ${WITH_WARNINGS_AS_ERRORS} COMPILE_WARNING_AS_ERROR ${WITH_WARNINGS_AS_ERRORS}
@@ -225,7 +217,7 @@ set_target_properties(scripts
# Generate precompiled header # Generate precompiled header
if(USE_SCRIPTPCH) if(USE_SCRIPTPCH)
add_cxx_pch("scripts" ${PRIVATE_PCH_HEADER} ${DYNAMIC_SCRIPT_MODULE_PROJECTS}) add_cxx_pch("scripts" ScriptPCH.h ${DYNAMIC_SCRIPT_MODULE_PROJECTS})
reuse_cxx_pch("${DYNAMIC_SCRIPT_MODULE_PROJECTS}" scripts) reuse_cxx_pch("${DYNAMIC_SCRIPT_MODULE_PROJECTS}" scripts)
endif() endif()
+5 -19
View File
@@ -8,31 +8,17 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
if(USE_COREPCH)
set(PRIVATE_PCH_HEADER PrecompiledHeaders/sharedPCH.h)
endif()
GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
add_library(shared add_library(shared)
${PRIVATE_SOURCES}
)
CollectIncludeDirectories( CollectAndAddSourceFiles(
shared
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC_INCLUDES EXCLUDE
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders) ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
target_include_directories(shared target_include_directories(shared
PUBLIC
${PUBLIC_INCLUDES}
PRIVATE PRIVATE
${CMAKE_CURRENT_BINARY_DIR}) ${CMAKE_CURRENT_BINARY_DIR})
@@ -66,5 +52,5 @@ endif()
# Generate precompiled header # Generate precompiled header
if(USE_COREPCH) if(USE_COREPCH)
add_cxx_pch(shared ${PRIVATE_PCH_HEADER}) add_cxx_pch(shared PrecompiledHeaders/sharedPCH.h)
endif() endif()
+12 -26
View File
@@ -8,29 +8,23 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
if(WIN32)
if(MSVC)
list(APPEND PRIVATE_SOURCES worldserver.rc)
endif()
endif()
if(USE_COREPCH)
set(PRIVATE_PCH_HEADER PrecompiledHeaders/worldPCH.h)
endif()
GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
add_executable(worldserver add_executable(worldserver
${PRIVATE_SOURCES} ${PRIVATE_SOURCES}
) )
if(NOT WIN32) CollectAndAddSourceFiles(
worldserver
${CMAKE_CURRENT_SOURCE_DIR}
EXCLUDE
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
if(WIN32)
if(MSVC)
target_sources(worldserver PRIVATE worldserver.rc)
endif()
else()
target_compile_definitions(worldserver PRIVATE target_compile_definitions(worldserver PRIVATE
_TRINITY_CORE_CONFIG="${CONF_DIR}/worldserver.conf" _TRINITY_CORE_CONFIG="${CONF_DIR}/worldserver.conf"
_TRINITY_CORE_CONFIG_DIR="${CONF_DIR}/worldserver.conf.d" _TRINITY_CORE_CONFIG_DIR="${CONF_DIR}/worldserver.conf.d"
@@ -46,15 +40,7 @@ target_link_libraries(worldserver
readline readline
gsoap) gsoap)
CollectIncludeDirectories(
${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC_INCLUDES
# Exclude
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
target_include_directories(worldserver target_include_directories(worldserver
PUBLIC
${PUBLIC_INCLUDES}
PRIVATE PRIVATE
${CMAKE_CURRENT_BINARY_DIR}) ${CMAKE_CURRENT_BINARY_DIR})
@@ -90,5 +76,5 @@ endif()
# Generate precompiled header # Generate precompiled header
if(USE_COREPCH) if(USE_COREPCH)
add_cxx_pch(worldserver ${PRIVATE_PCH_HEADER}) add_cxx_pch(worldserver PrecompiledHeaders/worldPCH.h)
endif() endif()
+4 -8
View File
@@ -8,11 +8,11 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CollectSourceFiles( add_library(extractor_common STATIC)
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES)
add_library(extractor_common STATIC ${PRIVATE_SOURCES}) CollectAndAddSourceFiles(
extractor_common
${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(extractor_common target_link_libraries(extractor_common
PRIVATE PRIVATE
@@ -22,10 +22,6 @@ target_link_libraries(extractor_common
common common
network) network)
target_include_directories(extractor_common
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR})
set_target_properties(extractor_common set_target_properties(extractor_common
PROPERTIES PROPERTIES
COMPILE_WARNING_AS_ERROR ${WITH_WARNINGS_AS_ERRORS} COMPILE_WARNING_AS_ERROR ${WITH_WARNINGS_AS_ERRORS}
+4 -17
View File
@@ -8,18 +8,11 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CollectSourceFiles( add_executable(mapextractor)
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES)
add_executable(mapextractor CollectAndAddSourceFiles(
${PRIVATE_SOURCES} mapextractor
) ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(mapextractor
PUBLIC
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/loadlib)
target_link_libraries(mapextractor target_link_libraries(mapextractor
PRIVATE PRIVATE
@@ -27,13 +20,7 @@ target_link_libraries(mapextractor
PUBLIC PUBLIC
extractor_common) extractor_common)
CollectIncludeDirectories(
${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC_INCLUDES)
target_include_directories(mapextractor target_include_directories(mapextractor
PUBLIC
${PUBLIC_INCLUDES}
PRIVATE PRIVATE
${CMAKE_CURRENT_BINARY_DIR}) ${CMAKE_CURRENT_BINARY_DIR})
+4 -10
View File
@@ -8,11 +8,11 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CollectSourceFiles( add_executable(mmaps_generator)
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES)
add_executable(mmaps_generator ${PRIVATE_SOURCES}) CollectAndAddSourceFiles(
mmaps_generator
${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(mmaps_generator target_link_libraries(mmaps_generator
PRIVATE PRIVATE
@@ -20,13 +20,7 @@ target_link_libraries(mmaps_generator
extractor_common extractor_common
mmaps_common) mmaps_common)
CollectIncludeDirectories(
${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC_INCLUDES)
target_include_directories(mmaps_generator target_include_directories(mmaps_generator
PUBLIC
${PUBLIC_INCLUDES}
PRIVATE PRIVATE
${CMAKE_CURRENT_BINARY_DIR}) ${CMAKE_CURRENT_BINARY_DIR})
+4 -5
View File
@@ -8,12 +8,11 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
set(PRIVATE_SOURCES add_executable(vmap4assembler)
TileAssembler.cpp
TileAssembler.h
VMapAssembler.cpp)
add_executable(vmap4assembler ${PRIVATE_SOURCES}) CollectAndAddSourceFiles(
vmap4assembler
${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(vmap4assembler target_link_libraries(vmap4assembler
PRIVATE PRIVATE
+6 -10
View File
@@ -8,11 +8,13 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CollectSourceFiles( add_executable(vmap4extractor)
${CMAKE_CURRENT_SOURCE_DIR}
PRIVATE_SOURCES)
add_executable(vmap4extractor ${PRIVATE_SOURCES}) CollectAndAddSourceFiles(
vmap4extractor
${CMAKE_CURRENT_SOURCE_DIR}
EXCLUDE
${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders)
target_link_libraries(vmap4extractor target_link_libraries(vmap4extractor
PRIVATE PRIVATE
@@ -20,13 +22,7 @@ target_link_libraries(vmap4extractor
PUBLIC PUBLIC
extractor_common) extractor_common)
CollectIncludeDirectories(
${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC_INCLUDES)
target_include_directories(vmap4extractor target_include_directories(vmap4extractor
PUBLIC
${PUBLIC_INCLUDES}
PRIVATE PRIVATE
${CMAKE_CURRENT_BINARY_DIR}) ${CMAKE_CURRENT_BINARY_DIR})
+5 -12
View File
@@ -8,14 +8,13 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}
TEST_SOURCES
)
GroupSources(${CMAKE_CURRENT_SOURCE_DIR}) GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
add_executable(tests ${TEST_SOURCES}) add_executable(tests)
CollectAndAddSourceFiles(
tests
${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(tests target_link_libraries(tests
PRIVATE PRIVATE
@@ -23,13 +22,7 @@ target_link_libraries(tests
game game
Catch2::Catch2) Catch2::Catch2)
CollectIncludeDirectories(
${CMAKE_CURRENT_SOURCE_DIR}
TEST_INCLUDES)
target_include_directories(tests target_include_directories(tests
PUBLIC
${TEST_INCLUDES}
PRIVATE PRIVATE
${CMAKE_CURRENT_BINARY_DIR}) ${CMAKE_CURRENT_BINARY_DIR})