Moving stuff around - not currently buildable!
This commit is contained in:
parent
83ac5dc544
commit
f8a090abba
@ -1,8 +1,8 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||||
|
|
||||||
PROJECT(PolyVoxProject)
|
PROJECT(PolyVox)
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(library)
|
ADD_SUBDIRECTORY(PolyVoxCore)
|
||||||
ADD_SUBDIRECTORY(examples/OpenGL)
|
ADD_SUBDIRECTORY(examples/OpenGL)
|
||||||
|
|
||||||
ADD_DEPENDENCIES(OpenGLExample PolyVox)
|
ADD_DEPENDENCIES(OpenGLExample PolyVoxCore)
|
@ -1,14 +1,12 @@
|
|||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
||||||
|
|
||||||
PROJECT(PolyVox)
|
PROJECT(PolyVoxCore)
|
||||||
|
|
||||||
SET(POLYVOX_VERSION_MAJOR "0")
|
SET(POLYVOX_VERSION_MAJOR "0")
|
||||||
SET(POLYVOX_VERSION_MINOR "1")
|
SET(POLYVOX_VERSION_MINOR "1")
|
||||||
SET(POLYVOX_VERSION_PATCH "0")
|
SET(POLYVOX_VERSION_PATCH "0")
|
||||||
SET(POLYVOX_VERSION "${POLYVOX_VERSION_MAJOR}.${POLYVOX_VERSION_MINOR}.${POLYVOX_VERSION_PATCH}")
|
SET(POLYVOX_VERSION "${POLYVOX_VERSION_MAJOR}.${POLYVOX_VERSION_MINOR}.${POLYVOX_VERSION_PATCH}")
|
||||||
|
|
||||||
#ADD_SUBDIRECTORY(examples/OpenGL)
|
|
||||||
|
|
||||||
#Projects source files
|
#Projects source files
|
||||||
SET(SRC_FILES
|
SET(SRC_FILES
|
||||||
source/IndexedSurfacePatch.cpp
|
source/IndexedSurfacePatch.cpp
|
||||||
@ -72,18 +70,17 @@ SOURCE_GROUP("Headers" FILES ${INC_FILES})
|
|||||||
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||||
|
|
||||||
#Build
|
#Build
|
||||||
ADD_LIBRARY(PolyVox SHARED ${SRC_FILES} ${INC_FILES})
|
ADD_LIBRARY(PolyVoxCore SHARED ${SRC_FILES} ${INC_FILES})
|
||||||
#TARGET_LINK_LIBRARIES(PolyVox)
|
SET_TARGET_PROPERTIES(PolyVoxCore PROPERTIES VERSION ${POLYVOX_VERSION} SOVERSION ${POLYVOX_VERSION_MAJOR})
|
||||||
SET_TARGET_PROPERTIES(PolyVox PROPERTIES VERSION ${POLYVOX_VERSION} SOVERSION ${POLYVOX_VERSION_MAJOR})
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET_TARGET_PROPERTIES(PolyVox PROPERTIES COMPILE_FLAGS "/wd4251") #Disable warning on STL exports
|
SET_TARGET_PROPERTIES(PolyVoxCore PROPERTIES COMPILE_FLAGS "/wd4251") #Disable warning on STL exports
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
#Install
|
#Install
|
||||||
INSTALL(TARGETS PolyVox
|
INSTALL(TARGETS PolyVoxCore
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
)
|
)
|
||||||
|
|
||||||
INSTALL(FILES ${INC_FILES} DESTINATION include/PolyVox)
|
INSTALL(FILES ${INC_FILES} DESTINATION include/PolyVoxCore)
|
||||||
|
@ -26,11 +26,18 @@ IF (WIN32)
|
|||||||
#Also, glut32.dll goes in C:\Windows\System. Using C:\Windows\System32 doesn't seem to work
|
#Also, glut32.dll goes in C:\Windows\System. Using C:\Windows\System32 doesn't seem to work
|
||||||
|
|
||||||
#Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location)
|
#Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location)
|
||||||
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR} "../../library/include")
|
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR} "../../PolyVoxCore/include")
|
||||||
#No idea why we have to look three levels up for build and only two for include. They should be the same level?!
|
#No idea why we have to look three levels up for build and only two for include. They should be the same level?!
|
||||||
LINK_DIRECTORIES("../../../build/library")
|
LINK_DIRECTORIES("../../../build/PolyVoxCore")
|
||||||
|
|
||||||
#Build
|
#Build
|
||||||
ADD_EXECUTABLE(OpenGLExample ${SRC_FILES})
|
ADD_EXECUTABLE(OpenGLExample ${SRC_FILES})
|
||||||
TARGET_LINK_LIBRARIES(OpenGLExample glut32.lib ${OPENGL_gl_LIBRARY} debug PolyVox_d.lib optimized PolyVox.lib)
|
TARGET_LINK_LIBRARIES(OpenGLExample glut32.lib ${OPENGL_gl_LIBRARY} debug PolyVoxCore_d.lib optimized PolyVoxCore.lib)
|
||||||
ENDIF (WIN32)
|
ENDIF (WIN32)
|
||||||
|
|
||||||
|
#Install
|
||||||
|
INSTALL(TARGETS OpenGLExample
|
||||||
|
RUNTIME DESTINATION bin
|
||||||
|
LIBRARY DESTINATION lib
|
||||||
|
ARCHIVE DESTINATION lib
|
||||||
|
)
|
Loading…
x
Reference in New Issue
Block a user