Massive changes to the organisation of PolyVoxCore and PolyVoxYtil.
Also added start of logging capability.
This commit is contained in:
@ -1,131 +1,9 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||
|
||||
PROJECT(PolyVoxCore)
|
||||
PROJECT(PolyVox)
|
||||
|
||||
#Projects source files
|
||||
SET(CORE_SRC_FILES
|
||||
source/PolyVoxCore/GradientEstimators.cpp
|
||||
source/PolyVoxCore/IndexedSurfacePatch.cpp
|
||||
source/PolyVoxCore/Region.cpp
|
||||
source/PolyVoxCore/SurfaceAdjusters.cpp
|
||||
source/PolyVoxCore/SurfaceExtractors.cpp
|
||||
source/PolyVoxCore/SurfaceVertex.cpp
|
||||
source/PolyVoxCore/VoxelFilters.cpp
|
||||
)
|
||||
|
||||
#Projects headers files
|
||||
SET(CORE_INC_FILES
|
||||
include/PolyVoxCore/GradientEstimators.h
|
||||
include/PolyVoxCore/GradientEstimators.inl
|
||||
include/PolyVoxCore/IndexedSurfacePatch.h
|
||||
include/PolyVoxCore/PolyVoxForwardDeclarations.h
|
||||
include/PolyVoxCore/Region.h
|
||||
include/PolyVoxCore/SurfaceAdjusters.h
|
||||
include/PolyVoxCore/SurfaceExtractors.h
|
||||
include/PolyVoxCore/SurfaceVertex.h
|
||||
include/PolyVoxCore/Vector.h
|
||||
include/PolyVoxCore/Vector.inl
|
||||
include/PolyVoxCore/Volume.h
|
||||
include/PolyVoxCore/Volume.inl
|
||||
include/PolyVoxCore/VolumeIterator.h
|
||||
include/PolyVoxCore/VolumeIterator.inl
|
||||
include/PolyVoxCore/VoxelFilters.h
|
||||
)
|
||||
|
||||
SET(IMPL_SRC_FILES
|
||||
source/PolyVoxCore/PolyVoxImpl/DecimatedSurfaceExtractor.cpp
|
||||
source/PolyVoxCore/PolyVoxImpl/FastSurfaceExtractor.cpp
|
||||
source/PolyVoxCore/PolyVoxImpl/MarchingCubesTables.cpp
|
||||
source/PolyVoxCore/PolyVoxImpl/ReferenceSurfaceExtractor.cpp
|
||||
source/PolyVoxCore/PolyVoxImpl/Utility.cpp
|
||||
)
|
||||
|
||||
SET(IMPL_INC_FILES
|
||||
include/PolyVoxCore/PolyVoxImpl/Block.h
|
||||
include/PolyVoxCore/PolyVoxImpl/Block.inl
|
||||
include/PolyVoxCore/PolyVoxImpl/BlockData.h
|
||||
include/PolyVoxCore/PolyVoxImpl/BlockData.inl
|
||||
include/PolyVoxCore/PolyVoxImpl/CPlusPlusZeroXSupport.h
|
||||
include/PolyVoxCore/PolyVoxImpl/DecimatedSurfaceExtractor.h
|
||||
include/PolyVoxCore/PolyVoxImpl/FastSurfaceExtractor.h
|
||||
include/PolyVoxCore/PolyVoxImpl/MarchingCubesTables.h
|
||||
include/PolyVoxCore/PolyVoxImpl/ReferenceSurfaceExtractor.h
|
||||
include/PolyVoxCore/PolyVoxImpl/TypeDef.h
|
||||
include/PolyVoxCore/PolyVoxImpl/Utility.h
|
||||
)
|
||||
|
||||
#Projects source files
|
||||
SET(UTIL_SRC_FILES
|
||||
source/PolyVoxUtil/Serialization.cpp
|
||||
source/PolyVoxUtil/VolumeChangeTracker.cpp
|
||||
)
|
||||
|
||||
#Projects headers files
|
||||
SET(UTIL_INC_FILES
|
||||
include/PolyVoxUtil/Serialization.h
|
||||
include/PolyVoxUtil/VolumeChangeTracker.h
|
||||
)
|
||||
|
||||
ADD_DEFINITIONS(-DPOLYVOX_EXPORT) #Export symbols in the .dll
|
||||
|
||||
#Appends "_d" to the generated library when in debug mode
|
||||
SET(CMAKE_DEBUG_POSTFIX "_d")
|
||||
|
||||
#"Sources" and "Headers" are the group names in Visual Studio.
|
||||
#They may have other uses too...
|
||||
SOURCE_GROUP("Sources" FILES ${CORE_SRC_FILES})
|
||||
SOURCE_GROUP("Headers" FILES ${CORE_INC_FILES})
|
||||
|
||||
SOURCE_GROUP("Sources\\PolyVoxImpl" FILES ${IMPL_SRC_FILES})
|
||||
SOURCE_GROUP("Headers\\PolyVoxImpl" FILES ${IMPL_INC_FILES})
|
||||
|
||||
SOURCE_GROUP("Sources" FILES ${UTIL_SRC_FILES})
|
||||
SOURCE_GROUP("Headers" FILES ${UTIL_INC_FILES})
|
||||
|
||||
#Tell CMake the paths
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
#Core
|
||||
#Build
|
||||
ADD_LIBRARY(PolyVoxCore SHARED ${CORE_SRC_FILES} ${CORE_INC_FILES} ${IMPL_SRC_FILES} ${IMPL_INC_FILES})
|
||||
SET_TARGET_PROPERTIES(PolyVoxCore PROPERTIES VERSION ${POLYVOX_VERSION} SOVERSION ${POLYVOX_VERSION_MAJOR})
|
||||
IF(WIN32)
|
||||
SET_TARGET_PROPERTIES(PolyVoxCore PROPERTIES COMPILE_FLAGS "/wd4251") #Disable warning on STL exports
|
||||
ENDIF(WIN32)
|
||||
|
||||
#Install
|
||||
INSTALL(TARGETS PolyVoxCore
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
COMPONENT library
|
||||
)
|
||||
|
||||
#Install the core header files, including the ones in the PolyVoxImpl subfolder.
|
||||
INSTALL(DIRECTORY include/PolyVoxCore DESTINATION include COMPONENT development PATTERN "*.svn*" EXCLUDE)
|
||||
|
||||
#Util
|
||||
#Build
|
||||
ADD_LIBRARY(PolyVoxUtil SHARED ${UTIL_SRC_FILES} ${UTIL_INC_FILES})
|
||||
TARGET_LINK_LIBRARIES(PolyVoxUtil PolyVoxCore)
|
||||
SET_TARGET_PROPERTIES(PolyVoxUtil PROPERTIES VERSION ${POLYVOX_VERSION} SOVERSION ${POLYVOX_VERSION_MAJOR})
|
||||
IF(WIN32)
|
||||
SET_TARGET_PROPERTIES(PolyVoxUtil PROPERTIES COMPILE_FLAGS "/wd4251") #Disable warning on STL exports
|
||||
ENDIF(WIN32)
|
||||
|
||||
#Install
|
||||
INSTALL(TARGETS PolyVoxUtil
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
COMPONENT library
|
||||
)
|
||||
|
||||
#Install the util header files.
|
||||
INSTALL(DIRECTORY include/PolyVoxUtil DESTINATION include COMPONENT development PATTERN "*.svn*" EXCLUDE)
|
||||
|
||||
#Copy the boost files which we a re using to mimic C++0x
|
||||
INSTALL(DIRECTORY include/boost DESTINATION include COMPONENT development PATTERN "*.svn*" EXCLUDE)
|
||||
add_subdirectory(PolyVoxCore)
|
||||
add_subdirectory(PolyVoxUtil)
|
||||
|
||||
#Set up PolyVoxConfig.cmake
|
||||
if(WIN32)
|
||||
|
Reference in New Issue
Block a user