diff --git a/examples/OpenGL/CMakeLists.txt b/examples/OpenGL/CMakeLists.txt index 2787d99a..b39de1b0 100644 --- a/examples/OpenGL/CMakeLists.txt +++ b/examples/OpenGL/CMakeLists.txt @@ -27,9 +27,6 @@ SET(INC_FILES ADD_DEFINITIONS(-DGLEW_STATIC) -#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 ${SRC_FILES}) @@ -40,11 +37,6 @@ INCLUDE(${QT_USE_FILE}) FIND_PACKAGE(OpenGL REQUIRED) -#NOTE: In Windows I haven't had much luck getting the FindGLUT script to work correctly. -#The easiest solution has been to install GLUT alongside OpenGL, which is already in the system path. -#This means glut.h and glut32.lib go in the 'include' and 'lib' folders within Microsoft Visual Studio 8\VC\PlatformSDK\ -#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) INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR} ${PolyVoxCore_SOURCE_DIR}/include) #There has to be a better way! @@ -52,7 +44,7 @@ LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR}/debug ${PolyVoxCore_BINARY_DIR}/relea #Build ADD_EXECUTABLE(OpenGLExample ${SRC_FILES}) -TARGET_LINK_LIBRARIES(OpenGLExample ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} debug PolyVoxCore_d optimized PolyVoxCore) +TARGET_LINK_LIBRARIES(OpenGLExample ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} PolyVoxCore) #Install - Only install the example in Windows IF(WIN32) @@ -66,6 +58,6 @@ IF(WIN32) 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_d.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Debug) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../debug/PolyVoxUtil_d.dll DESTINATION Examples/OpenGL/bin CONFIGURATIONS Debug) + 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/PolyVoxCore/CMakeLists.txt b/library/PolyVoxCore/CMakeLists.txt index a594fe71..442f91ca 100644 --- a/library/PolyVoxCore/CMakeLists.txt +++ b/library/PolyVoxCore/CMakeLists.txt @@ -55,9 +55,6 @@ SET(IMPL_INC_FILES ADD_DEFINITIONS(-DPOLYVOXCORE_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}) @@ -92,7 +89,7 @@ IF(WIN32) #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/PolyVoxCore_d.pdb DESTINATION PolyVoxCore/lib CONFIGURATIONS Debug) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../Debug/PolyVoxCore.pdb DESTINATION PolyVoxCore/lib CONFIGURATIONS Debug) ELSE(WIN32) INSTALL(TARGETS PolyVoxCore RUNTIME DESTINATION bin diff --git a/library/PolyVoxUtil/CMakeLists.txt b/library/PolyVoxUtil/CMakeLists.txt index 9adcb9f2..7a8d8c15 100644 --- a/library/PolyVoxUtil/CMakeLists.txt +++ b/library/PolyVoxUtil/CMakeLists.txt @@ -17,9 +17,6 @@ SET(UTIL_INC_FILES ADD_DEFINITIONS(-DPOLYVOXUTIL_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 ${UTIL_SRC_FILES}) @@ -33,7 +30,7 @@ LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR}/debug ${PolyVoxCore_BINARY_DIR}/relea #Util #Build ADD_LIBRARY(PolyVoxUtil SHARED ${UTIL_SRC_FILES} ${UTIL_INC_FILES}) -TARGET_LINK_LIBRARIES(PolyVoxUtil debug PolyVoxCore_d optimized PolyVoxCore) +TARGET_LINK_LIBRARIES(PolyVoxUtil PolyVoxCore) SET_TARGET_PROPERTIES(PolyVoxUtil PROPERTIES VERSION ${POLYVOX_VERSION} SOVERSION ${POLYVOX_VERSION_MAJOR}) IF(MSVC) SET_TARGET_PROPERTIES(PolyVoxUtil PROPERTIES COMPILE_FLAGS "/wd4251") #Disable warning on STL exports @@ -54,7 +51,7 @@ IF(WIN32) #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_d.pdb DESTINATION PolyVoxUtil/lib CONFIGURATIONS Debug) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/../../Debug/PolyVoxUtil.pdb DESTINATION PolyVoxUtil/lib CONFIGURATIONS Debug) ELSE(WIN32) INSTALL(TARGETS PolyVoxUtil RUNTIME DESTINATION bin @@ -63,6 +60,6 @@ ELSE(WIN32) COMPONENT library ) - #Install the core header files, including the ones in the PolyVoxImpl subfolder. + #Install the util header files. INSTALL(DIRECTORY include/ DESTINATION include/PolyVoxUtil COMPONENT development PATTERN "*.svn*" EXCLUDE) ENDIF(WIN32)