2016-03-13 14:13:17 -04:00
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/src/)
|
2016-08-24 15:45:03 -04:00
|
|
|
include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/lib/)
|
2016-03-13 14:13:17 -04:00
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
|
|
|
set (SHARED_SRCS
|
|
|
|
${CMAKE_SOURCE_DIR}/src/BiomeDef.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/src/BlockArea.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/src/Cuboid.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/src/ChunkData.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/src/StringCompression.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/src/StringUtils.cpp
|
|
|
|
|
|
|
|
${CMAKE_SOURCE_DIR}/src/Noise/Noise.cpp
|
|
|
|
|
|
|
|
${CMAKE_SOURCE_DIR}/src/OSSupport/CriticalSection.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/src/OSSupport/Event.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/src/OSSupport/File.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/src/OSSupport/GZipFile.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/src/OSSupport/StackTrace.cpp
|
2017-06-19 05:05:19 -04:00
|
|
|
${CMAKE_SOURCE_DIR}/src/OSSupport/WinStackWalker.cpp
|
2016-03-13 14:13:17 -04:00
|
|
|
|
|
|
|
${CMAKE_SOURCE_DIR}/src/WorldStorage/FastNBT.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/src/WorldStorage/SchematicFileSerializer.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set (SHARED_HDRS
|
|
|
|
${CMAKE_SOURCE_DIR}/src/BiomeDef.h
|
|
|
|
${CMAKE_SOURCE_DIR}/src/BlockArea.h
|
|
|
|
${CMAKE_SOURCE_DIR}/src/Cuboid.h
|
|
|
|
${CMAKE_SOURCE_DIR}/src/ChunkData.h
|
|
|
|
${CMAKE_SOURCE_DIR}/src/Globals.h
|
|
|
|
${CMAKE_SOURCE_DIR}/src/StringCompression.h
|
|
|
|
${CMAKE_SOURCE_DIR}/src/StringUtils.h
|
|
|
|
|
|
|
|
${CMAKE_SOURCE_DIR}/src/Bindings/LuaState.h
|
|
|
|
|
|
|
|
${CMAKE_SOURCE_DIR}/src/Generating/ChunkDesc.h
|
2017-02-26 16:49:23 -05:00
|
|
|
${CMAKE_SOURCE_DIR}/src/Generating/PiecePool.h
|
2016-03-13 14:13:17 -04:00
|
|
|
${CMAKE_SOURCE_DIR}/src/Generating/Prefab.h
|
|
|
|
${CMAKE_SOURCE_DIR}/src/Generating/PrefabPiecePool.h
|
|
|
|
${CMAKE_SOURCE_DIR}/src/Generating/VerticalLimit.h
|
|
|
|
${CMAKE_SOURCE_DIR}/src/Generating/VerticalStrategy.h
|
|
|
|
|
|
|
|
${CMAKE_SOURCE_DIR}/src/Noise/Noise.h
|
|
|
|
|
|
|
|
${CMAKE_SOURCE_DIR}/src/OSSupport/CriticalSection.h
|
|
|
|
${CMAKE_SOURCE_DIR}/src/OSSupport/Event.h
|
|
|
|
${CMAKE_SOURCE_DIR}/src/OSSupport/File.h
|
|
|
|
${CMAKE_SOURCE_DIR}/src/OSSupport/GZipFile.h
|
|
|
|
${CMAKE_SOURCE_DIR}/src/OSSupport/StackTrace.h
|
2017-06-19 05:05:19 -04:00
|
|
|
${CMAKE_SOURCE_DIR}/src/OSSupport/WinStackWalker.h
|
2016-03-13 14:13:17 -04:00
|
|
|
|
|
|
|
${CMAKE_SOURCE_DIR}/src/WorldStorage/FastNBT.h
|
|
|
|
${CMAKE_SOURCE_DIR}/src/WorldStorage/SchematicFileSerializer.h
|
|
|
|
)
|
|
|
|
|
|
|
|
set (SRCS
|
|
|
|
SchematicFileSerializerTest.cpp
|
|
|
|
Stubs.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
2020-05-16 15:59:10 -04:00
|
|
|
add_compile_options("-Wno-error=global-constructors")
|
2016-03-13 14:13:17 -04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
source_group("Shared" FILES ${SHARED_SRCS} ${SHARED_HDRS})
|
|
|
|
source_group("Sources" FILES ${SRCS})
|
|
|
|
add_executable(SchematicFileSerializer-exe ${SRCS} ${SHARED_SRCS} ${SHARED_HDRS})
|
2018-01-03 12:41:16 -05:00
|
|
|
target_link_libraries(SchematicFileSerializer-exe zlib fmt::fmt)
|
2016-03-13 14:13:17 -04:00
|
|
|
add_test(NAME SchematicFileSerializer-test WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND SchematicFileSerializer-exe)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Put the projects into solution folders (MSVC):
|
|
|
|
set_target_properties(
|
|
|
|
SchematicFileSerializer-exe
|
|
|
|
PROPERTIES FOLDER Tests
|
|
|
|
)
|