From a296807ed90661c39759d20396f88a37720aa449 Mon Sep 17 00:00:00 2001 From: David Williams Date: Sat, 7 Feb 2015 14:59:08 +0100 Subject: [PATCH] Removed PolyVoxUtil. --- examples/Basic/CMakeLists.txt | 7 --- examples/DecodeOnGPU/CMakeLists.txt | 7 --- examples/OpenGL/CMakeLists.txt | 7 --- examples/Paging/CMakeLists.txt | 7 --- examples/SmoothLOD/CMakeLists.txt | 7 --- library/CMakeLists.txt | 5 -- library/PolyVoxUtil/CMakeLists.txt | 92 ---------------------------- library/PolyVoxUtil/source/Dummy.cpp | 16 ----- tests/CMakeLists.txt | 3 +- 9 files changed, 1 insertion(+), 150 deletions(-) delete mode 100644 library/PolyVoxUtil/CMakeLists.txt delete mode 100644 library/PolyVoxUtil/source/Dummy.cpp diff --git a/examples/Basic/CMakeLists.txt b/examples/Basic/CMakeLists.txt index 153b0570..98e42789 100644 --- a/examples/Basic/CMakeLists.txt +++ b/examples/Basic/CMakeLists.txt @@ -64,11 +64,4 @@ IF(WIN32) ARCHIVE DESTINATION Examples/OpenGL/lib COMPONENT example ) - - #.dlls should be installed in shared builds. - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../release/PolyVoxCore.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Release) - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../release/PolyVoxUtil.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Release) - - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../debug/PolyVoxCore.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Debug) - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../debug/PolyVoxUtil.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Debug) ENDIF(WIN32) diff --git a/examples/DecodeOnGPU/CMakeLists.txt b/examples/DecodeOnGPU/CMakeLists.txt index 3cb051f5..60a3bfb5 100644 --- a/examples/DecodeOnGPU/CMakeLists.txt +++ b/examples/DecodeOnGPU/CMakeLists.txt @@ -65,11 +65,4 @@ IF(WIN32) ARCHIVE DESTINATION Examples/OpenGL/lib COMPONENT example ) - - #.dlls should be installed in shared builds. - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../release/PolyVoxCore.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Release) - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../release/PolyVoxUtil.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Release) - - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../debug/PolyVoxCore.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Debug) - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../debug/PolyVoxUtil.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Debug) ENDIF(WIN32) diff --git a/examples/OpenGL/CMakeLists.txt b/examples/OpenGL/CMakeLists.txt index 129dac1b..ef950a07 100644 --- a/examples/OpenGL/CMakeLists.txt +++ b/examples/OpenGL/CMakeLists.txt @@ -67,11 +67,4 @@ IF(WIN32) ARCHIVE DESTINATION Examples/OpenGL/lib COMPONENT example ) - - #.dlls should be installed in shared builds. - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../release/PolyVoxCore.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Release) - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../release/PolyVoxUtil.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Release) - - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../debug/PolyVoxCore.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Debug) - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../debug/PolyVoxUtil.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Debug) ENDIF(WIN32) diff --git a/examples/Paging/CMakeLists.txt b/examples/Paging/CMakeLists.txt index b256cfa5..cc67d64d 100644 --- a/examples/Paging/CMakeLists.txt +++ b/examples/Paging/CMakeLists.txt @@ -69,11 +69,4 @@ IF(WIN32) ARCHIVE DESTINATION Examples/OpenGL/lib COMPONENT example ) - - #.dlls should be installed in shared builds. - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../release/PolyVoxCore.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Release) - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../release/PolyVoxUtil.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Release) - - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../debug/PolyVoxCore.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Debug) - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../debug/PolyVoxUtil.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Debug) ENDIF(WIN32) diff --git a/examples/SmoothLOD/CMakeLists.txt b/examples/SmoothLOD/CMakeLists.txt index e11a715a..05cf87f3 100644 --- a/examples/SmoothLOD/CMakeLists.txt +++ b/examples/SmoothLOD/CMakeLists.txt @@ -67,11 +67,4 @@ IF(WIN32) ARCHIVE DESTINATION Examples/OpenGL/lib COMPONENT example ) - - #.dlls should be installed in shared builds. - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../release/PolyVoxCore.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Release) - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../release/PolyVoxUtil.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Release) - - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../debug/PolyVoxCore.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Debug) - #INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../debug/PolyVoxUtil.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Debug) ENDIF(WIN32) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 483cef00..5e5e5e96 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -25,22 +25,17 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(PolyVox) add_subdirectory(PolyVoxCore) -add_subdirectory(PolyVoxUtil) #Set up install paths e.g. for PolyVoxConfig.cmake if(WIN32) set(CONFIG_FILE_DIR "CMake") set(PolyVoxCore_LIBRARY_INSTALL_DIRS "PolyVoxCore/lib") - set(PolyVoxUtil_LIBRARY_INSTALL_DIRS "PolyVoxUtil/lib") set(PolyVoxCore_INCLUDE_INSTALL_DIRS "PolyVoxCore/include") - set(PolyVoxUtil_INCLUDE_INSTALL_DIRS "PolyVoxUtil/include") set(PolyVox_DOC_INSTALL_DIR "PolyVox/doc") else(WIN32) set(CONFIG_FILE_DIR "share/PolyVox/cmake") set(PolyVoxCore_LIBRARY_INSTALL_DIRS "lib") - set(PolyVoxUtil_LIBRARY_INSTALL_DIRS "lib") set(PolyVoxCore_INCLUDE_INSTALL_DIRS "include/PolyVoxCore") - set(PolyVoxUtil_INCLUDE_INSTALL_DIRS "include/PolyVoxUtil") set(PolyVox_DOC_INSTALL_DIR "share/doc/packages/polyvox") endif(WIN32) diff --git a/library/PolyVoxUtil/CMakeLists.txt b/library/PolyVoxUtil/CMakeLists.txt deleted file mode 100644 index 4df41a60..00000000 --- a/library/PolyVoxUtil/CMakeLists.txt +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright (c) 2008-2012 Matt Williams -# Copyright (c) 2008-2012 David Williams -# -# This software is provided 'as-is', without any express or implied -# warranty. In no event will the authors be held liable for any damages -# arising from the use of this software. -# -# Permission is granted to anyone to use this software for any purpose, -# including commercial applications, and to alter it and redistribute it -# freely, subject to the following restrictions: -# -# 1. The origin of this software must not be misrepresented; you must not -# claim that you wrote the original software. If you use this software -# in a product, an acknowledgment in the product documentation would be -# appreciated but is not required. -# -# 2. Altered source versions must be plainly marked as such, and must not be -# misrepresented as being the original software. -# -# 3. This notice may not be removed or altered from any source -# distribution. - -PROJECT(PolyVoxUtil) - -#Projects source files -SET(UTIL_SRC_FILES - source/Dummy.cpp -) - -#Projects headers files -SET(UTIL_INC_FILES - #Nothing here at the moment... -) - -ADD_DEFINITIONS(-DPOLYVOX_SHARED_EXPORTS) #Export symbols in the .dll - -#"Sources" and "Headers" are the group names in Visual Studio. -#They may have other uses too... -SOURCE_GROUP("Source Files" FILES ${UTIL_SRC_FILES}) -SOURCE_GROUP("Header Files" FILES ${UTIL_INC_FILES}) - -#Tell CMake the paths -INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include ${PolyVoxCore_BINARY_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include) -#There has to be a better way! -LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR}/debug ${PolyVoxCore_BINARY_DIR}/release ${PolyVoxCore_BINARY_DIR}) - -#Util -#Build -IF(LIBRARY_TYPE STREQUAL "STATIC") - ADD_LIBRARY(PolyVoxUtil STATIC ${UTIL_SRC_FILES} ${UTIL_INC_FILES}) - IF(UNIX) - SET_TARGET_PROPERTIES(PolyVoxCore PROPERTIES COMPILE_FLAGS -fPIC) - ENDIF() -ENDIF() -IF(LIBRARY_TYPE STREQUAL "DYNAMIC") - ADD_LIBRARY(PolyVoxUtil SHARED ${UTIL_SRC_FILES} ${UTIL_INC_FILES}) - SET_TARGET_PROPERTIES(PolyVoxUtil PROPERTIES COMPILE_FLAGS "-DPOLYVOX_SHARED_EXPORTS") -ENDIF() -SET_PROPERTY(TARGET PolyVoxUtil PROPERTY FOLDER "Library") - -TARGET_LINK_LIBRARIES(PolyVoxUtil) -SET_TARGET_PROPERTIES(PolyVoxUtil PROPERTIES VERSION ${POLYVOX_VERSION} SOVERSION ${POLYVOX_VERSION_MAJOR}) -IF(MSVC) - SET_TARGET_PROPERTIES(PolyVoxUtil PROPERTIES COMPILE_FLAGS "/W4 /wd4251 /wd4127") #Disable warning on STL exports -ENDIF(MSVC) - -#Install -IF(WIN32) - INSTALL(TARGETS PolyVoxUtil - RUNTIME DESTINATION PolyVoxUtil/bin COMPONENT library - LIBRARY DESTINATION PolyVoxUtil/lib COMPONENT library - ARCHIVE DESTINATION PolyVoxUtil/lib COMPONENT library - ) - - #Install the util header files. - INSTALL(DIRECTORY include DESTINATION PolyVoxUtil COMPONENT development PATTERN "*.svn*" EXCLUDE) - - #On windows, we also install the debug information. It's unfortunate that we have to hard-code - #the 'Debug' part of the path, but CMake doesn't seem to provide a way around this. The best I - #found was: http://www.cmake.org/pipermail/cmake/2007-October/016924.html (and it is a bit ugly). - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/Debug/PolyVoxUtil.pdb DESTINATION PolyVoxUtil/lib CONFIGURATIONS Debug) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/PolyVoxUtil.pdb DESTINATION PolyVoxUtil/lib CONFIGURATIONS RelWithDebInfo) -ELSE(WIN32) - INSTALL(TARGETS PolyVoxUtil - RUNTIME DESTINATION bin COMPONENT library - LIBRARY DESTINATION lib COMPONENT library - ARCHIVE DESTINATION lib COMPONENT library - ) - - #Install the util header files. - INSTALL(DIRECTORY include/ DESTINATION include/PolyVoxUtil COMPONENT development PATTERN "*.svn*" EXCLUDE) -ENDIF(WIN32) diff --git a/library/PolyVoxUtil/source/Dummy.cpp b/library/PolyVoxUtil/source/Dummy.cpp deleted file mode 100644 index 73e5e376..00000000 --- a/library/PolyVoxUtil/source/Dummy.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include "PolyVoxCore/Impl/TypeDef.h" - -namespace PolyVox -{ - class POLYVOX_API DummyClass - { - public: - int getx(void); - int x; - }; - - int DummyClass::getx(void) - { - return x; - } -} diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index fe6b35eb..02bdee0b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -27,9 +27,8 @@ MACRO(CREATE_TEST headerfile sourcefile executablename) UNSET(test_moc_SRCS) #clear out the MOCs from previous tests QT4_WRAP_CPP(test_moc_SRCS ${headerfile}) - LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR} ${PolyVoxUtil_BINARY_DIR}) ADD_EXECUTABLE(${executablename} ${sourcefile} ${test_moc_SRCS}) - TARGET_LINK_LIBRARIES(${executablename} PolyVoxUtil ${QT_QTTEST_LIBRARY} ${QT_QTCORE_LIBRARY}) + TARGET_LINK_LIBRARIES(${executablename} ${QT_QTTEST_LIBRARY} ${QT_QTCORE_LIBRARY}) #HACK. This is needed since everything is built in the base dir in Windows. As of 2.8 we should change this. IF(WIN32) SET(LATEST_TEST ${EXECUTABLE_OUTPUT_PATH}/${executablename})