2020-10-15 05:35:44 -04:00
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/src/)
|
|
|
|
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/lib/)
|
2015-06-18 17:30:41 -04:00
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
|
|
|
set (SHARED_SRCS
|
2020-10-15 05:35:44 -04:00
|
|
|
${PROJECT_SOURCE_DIR}/src/BiomeDef.cpp
|
|
|
|
${PROJECT_SOURCE_DIR}/src/BlockArea.cpp
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Cuboid.cpp
|
|
|
|
${PROJECT_SOURCE_DIR}/src/ChunkData.cpp
|
|
|
|
${PROJECT_SOURCE_DIR}/src/StringCompression.cpp
|
|
|
|
${PROJECT_SOURCE_DIR}/src/StringUtils.cpp
|
|
|
|
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Bindings/LuaState.cpp
|
|
|
|
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Generating/ChunkDesc.cpp
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Generating/PiecePool.cpp
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Generating/Prefab.cpp
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Generating/PrefabPiecePool.cpp
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Generating/VerticalLimit.cpp
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Generating/VerticalStrategy.cpp
|
|
|
|
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Noise/Noise.cpp
|
|
|
|
|
|
|
|
${PROJECT_SOURCE_DIR}/src/OSSupport/CriticalSection.cpp
|
|
|
|
${PROJECT_SOURCE_DIR}/src/OSSupport/Event.cpp
|
|
|
|
${PROJECT_SOURCE_DIR}/src/OSSupport/File.cpp
|
|
|
|
${PROJECT_SOURCE_DIR}/src/OSSupport/GZipFile.cpp
|
|
|
|
${PROJECT_SOURCE_DIR}/src/OSSupport/StackTrace.cpp
|
|
|
|
|
|
|
|
${PROJECT_SOURCE_DIR}/src/WorldStorage/FastNBT.cpp
|
|
|
|
${PROJECT_SOURCE_DIR}/src/WorldStorage/SchematicFileSerializer.cpp
|
2015-06-18 17:30:41 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
set (SHARED_HDRS
|
2020-10-15 05:35:44 -04:00
|
|
|
${PROJECT_SOURCE_DIR}/src/BiomeDef.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/BlockArea.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Cuboid.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/ChunkData.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Globals.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/StringCompression.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/StringUtils.h
|
|
|
|
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Bindings/LuaState.h
|
|
|
|
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Generating/ChunkDesc.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Generating/PiecePool.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Generating/Prefab.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Generating/PrefabPiecePool.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Generating/VerticalLimit.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Generating/VerticalStrategy.h
|
|
|
|
|
|
|
|
${PROJECT_SOURCE_DIR}/src/Noise/Noise.h
|
|
|
|
|
|
|
|
${PROJECT_SOURCE_DIR}/src/OSSupport/CriticalSection.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/OSSupport/Event.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/OSSupport/File.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/OSSupport/GZipFile.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/OSSupport/StackTrace.h
|
|
|
|
|
|
|
|
${PROJECT_SOURCE_DIR}/src/WorldStorage/FastNBT.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/WorldStorage/SchematicFileSerializer.h
|
2015-06-18 17:30:41 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
set (SRCS
|
|
|
|
LoadablePieces.cpp
|
|
|
|
Stubs.cpp
|
|
|
|
LuaState_Typedefs.inc
|
|
|
|
LuaState_Declaration.inc
|
|
|
|
Bindings.h
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
2020-05-16 15:59:10 -04:00
|
|
|
add_compile_options("-Wno-error=global-constructors")
|
|
|
|
add_compile_options("-Wno-error=switch-enum")
|
2015-06-18 17:30:41 -04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
if (MSVC)
|
|
|
|
# Add the MSVC-specific LeakFinder sources:
|
2020-10-15 05:35:44 -04:00
|
|
|
list (APPEND SHARED_SRCS ${PROJECT_SOURCE_DIR}/src/LeakFinder.cpp ${PROJECT_SOURCE_DIR}/src/StackWalker.cpp)
|
|
|
|
list (APPEND SHARED_HDRS ${PROJECT_SOURCE_DIR}/src/LeakFinder.h ${PROJECT_SOURCE_DIR}/src/StackWalker.h)
|
2015-06-18 17:30:41 -04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
source_group("Shared" FILES ${SHARED_SRCS} ${SHARED_HDRS})
|
|
|
|
source_group("Sources" FILES ${SRCS})
|
2017-01-15 05:40:10 -05:00
|
|
|
source_group("Data files" FILES Test.cubeset Test1.schematic)
|
|
|
|
add_executable(LoadablePieces ${SRCS} ${SHARED_SRCS} ${SHARED_HDRS} Test.cubeset Test1.schematic)
|
2015-06-18 17:30:41 -04:00
|
|
|
target_link_libraries(LoadablePieces tolualib zlib)
|
|
|
|
add_test(NAME LoadablePieces-test WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND LoadablePieces)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-13 13:22:35 -04:00
|
|
|
# Put the projects into solution folders (MSVC):
|
|
|
|
set_target_properties(
|
|
|
|
LoadablePieces
|
|
|
|
PROPERTIES FOLDER Tests
|
|
|
|
)
|