Index: /ps/trunk/libraries/nvtt/src/src/nvimage/CMakeLists.txt =================================================================== --- /ps/trunk/libraries/nvtt/src/src/nvimage/CMakeLists.txt (revision 11501) +++ /ps/trunk/libraries/nvtt/src/src/nvimage/CMakeLists.txt (revision 11502) @@ -63,6 +63,6 @@ INSTALL(TARGETS nvimage - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib/static) + RUNTIME DESTINATION ${BINDIR} + LIBRARY DESTINATION ${LIBDIR} + ARCHIVE DESTINATION ${LIBDIR}) Index: /ps/trunk/libraries/nvtt/src/src/nvtt/CMakeLists.txt =================================================================== --- /ps/trunk/libraries/nvtt/src/src/nvtt/CMakeLists.txt (revision 11501) +++ /ps/trunk/libraries/nvtt/src/src/nvtt/CMakeLists.txt (revision 11502) @@ -58,7 +58,7 @@ INSTALL(TARGETS nvtt - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib/static) + RUNTIME DESTINATION ${BINDIR} + LIBRARY DESTINATION ${LIBDIR} + ARCHIVE DESTINATION ${LIBDIR}) INSTALL(FILES nvtt.h DESTINATION include/nvtt) Index: /ps/trunk/libraries/nvtt/src/src/nvcore/CMakeLists.txt =================================================================== --- /ps/trunk/libraries/nvtt/src/src/nvcore/CMakeLists.txt (revision 11501) +++ /ps/trunk/libraries/nvtt/src/src/nvcore/CMakeLists.txt (revision 11502) @@ -43,5 +43,5 @@ INSTALL(TARGETS nvcore - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib/static) + RUNTIME DESTINATION ${BINDIR} + LIBRARY DESTINATION ${LIBDIR} + ARCHIVE DESTINATION ${LIBDIR}) Index: /ps/trunk/libraries/nvtt/src/src/CMakeLists.txt =================================================================== --- /ps/trunk/libraries/nvtt/src/src/CMakeLists.txt (revision 11501) +++ /ps/trunk/libraries/nvtt/src/src/CMakeLists.txt (revision 11502) @@ -6,4 +6,11 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) + +# initial variables +SET(GLUT TRUE CACHE BOOL "") +SET(GLEW TRUE CACHE BOOL "") +SET(CG TRUE CACHE BOOL "") +SET(CUDA TRUE CACHE BOOL "") +SET(OPENEXR TRUE CACHE BOOL "") # OpenGL @@ -16,11 +23,13 @@ # GLUT -INCLUDE(${NV_CMAKE_DIR}/FindGLUT.cmake) -#INCLUDE(FindGLUT) -IF(GLUT_FOUND) - MESSAGE(STATUS "Looking for GLUT - found") -ELSE(GLUT_FOUND) - MESSAGE(STATUS "Looking for GLUT - not found") -ENDIF(GLUT_FOUND) +IF(GLUT) + INCLUDE(${NV_CMAKE_DIR}/FindGLUT.cmake) + #INCLUDE(FindGLUT) + IF(GLUT_FOUND) + MESSAGE(STATUS "Looking for GLUT - found") + ELSE(GLUT_FOUND) + MESSAGE(STATUS "Looking for GLUT - not found") + ENDIF(GLUT_FOUND) +ENDIF(GLUT) # DirectX @@ -33,27 +42,33 @@ # GLEW -INCLUDE(${NV_CMAKE_DIR}/FindGLEW.cmake) -IF(GLEW_FOUND) - MESSAGE(STATUS "Looking for GLEW - found") -ELSE(GLEW_FOUND) - MESSAGE(STATUS "Looking for GLEW - not found") -ENDIF(GLEW_FOUND) +IF(GLEW) + INCLUDE(${NV_CMAKE_DIR}/FindGLEW.cmake) + IF(GLEW_FOUND) + MESSAGE(STATUS "Looking for GLEW - found") + ELSE(GLEW_FOUND) + MESSAGE(STATUS "Looking for GLEW - not found") + ENDIF(GLEW_FOUND) +ENDIF(GLEW) # Cg -INCLUDE(${NV_CMAKE_DIR}/FindCg.cmake) -IF(CG_FOUND) - MESSAGE(STATUS "Looking for Cg - found") -ELSE(CG_FOUND) - MESSAGE(STATUS "Looking for Cg - not found") -ENDIF(CG_FOUND) +IF(CG) + INCLUDE(${NV_CMAKE_DIR}/FindCg.cmake) + IF(CG_FOUND) + MESSAGE(STATUS "Looking for Cg - found") + ELSE(CG_FOUND) + MESSAGE(STATUS "Looking for Cg - not found") + ENDIF(CG_FOUND) +ENDIF(CG) # CUDA -INCLUDE(${NV_CMAKE_DIR}/FindCUDA.cmake) -IF(CUDA_FOUND) - SET(HAVE_CUDA ${CUDA_FOUND} CACHE BOOL "Set to TRUE if CUDA is found, FALSE otherwise") - MESSAGE(STATUS "Looking for CUDA - found") -ELSE(CUDA_FOUND) - MESSAGE(STATUS "Looking for CUDA - not found") -ENDIF(CUDA_FOUND) +IF(CUDA) + INCLUDE(${NV_CMAKE_DIR}/FindCUDA.cmake) + IF(CUDA_FOUND) + SET(HAVE_CUDA ${CUDA_FOUND} CACHE BOOL "Set to TRUE if CUDA is found, FALSE otherwise") + MESSAGE(STATUS "Looking for CUDA - found") + ELSE(CUDA_FOUND) + MESSAGE(STATUS "Looking for CUDA - not found") + ENDIF(CUDA_FOUND) +ENDIF(CUDA) # Maya @@ -94,11 +109,13 @@ # OpenEXR -INCLUDE(${NV_CMAKE_DIR}/FindOpenEXR.cmake) -IF(OPENEXR_FOUND) - SET(HAVE_OPENEXR ${OPENEXR_FOUND} CACHE BOOL "Set to TRUE if OpenEXR is found, FALSE otherwise") - MESSAGE(STATUS "Looking for OpenEXR - found") -ELSE(OPENEXR_FOUND) - MESSAGE(STATUS "Looking for OpenEXR - not found") -ENDIF(OPENEXR_FOUND) +IF(OPENEXR) + INCLUDE(${NV_CMAKE_DIR}/FindOpenEXR.cmake) + IF(OPENEXR_FOUND) + SET(HAVE_OPENEXR ${OPENEXR_FOUND} CACHE BOOL "Set to TRUE if OpenEXR is found, FALSE otherwise") + MESSAGE(STATUS "Looking for OpenEXR - found") + ELSE(OPENEXR_FOUND) + MESSAGE(STATUS "Looking for OpenEXR - not found") + ENDIF(OPENEXR_FOUND) +ENDIF(OPENEXR) # Qt Index: /ps/trunk/libraries/nvtt/src/src/nvmath/CMakeLists.txt =================================================================== --- /ps/trunk/libraries/nvtt/src/src/nvmath/CMakeLists.txt (revision 11501) +++ /ps/trunk/libraries/nvtt/src/src/nvmath/CMakeLists.txt (revision 11502) @@ -29,5 +29,5 @@ INSTALL(TARGETS nvmath - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib/static) + RUNTIME DESTINATION ${BINDIR} + LIBRARY DESTINATION ${LIBDIR} + ARCHIVE DESTINATION ${LIBDIR}) Index: /ps/trunk/libraries/nvtt/cmake-devflags.patch =================================================================== --- /ps/trunk/libraries/nvtt/cmake-devflags.patch (revision 11502) +++ /ps/trunk/libraries/nvtt/cmake-devflags.patch (revision 11502) @@ -0,0 +1,176 @@ +From: hasufell +Date: Wed Apr 11 21:49:58 UTC 2012 +Subject: various cmake fixes + +fix hardcoded install paths for BINDIR and LIBDIR +make cg, cuda, glew, glut and openexr controllable and not automagic + +--- src/nvcore/CMakeLists.txt ++++ src/nvcore/CMakeLists.txt +@@ -42,6 +42,6 @@ + TARGET_LINK_LIBRARIES(nvcore ${LIBS}) + + INSTALL(TARGETS nvcore +- RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib/static) ++ RUNTIME DESTINATION ${BINDIR} ++ LIBRARY DESTINATION ${LIBDIR} ++ ARCHIVE DESTINATION ${LIBDIR}) +--- src/nvimage/CMakeLists.txt ++++ src/nvimage/CMakeLists.txt +@@ -62,7 +62,7 @@ + TARGET_LINK_LIBRARIES(nvimage ${LIBS} nvcore nvmath posh) + + INSTALL(TARGETS nvimage +- RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib/static) ++ RUNTIME DESTINATION ${BINDIR} ++ LIBRARY DESTINATION ${LIBDIR} ++ ARCHIVE DESTINATION ${LIBDIR}) + +--- src/nvmath/CMakeLists.txt ++++ src/nvmath/CMakeLists.txt +@@ -28,6 +28,6 @@ + TARGET_LINK_LIBRARIES(nvmath ${LIBS} nvcore) + + INSTALL(TARGETS nvmath +- RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib/static) ++ RUNTIME DESTINATION ${BINDIR} ++ LIBRARY DESTINATION ${LIBDIR} ++ ARCHIVE DESTINATION ${LIBDIR}) +--- src/nvtt/CMakeLists.txt ++++ src/nvtt/CMakeLists.txt +@@ -53,9 +53,9 @@ + TARGET_LINK_LIBRARIES(nvtt ${LIBS} nvcore nvmath nvimage squish) + + INSTALL(TARGETS nvtt +- RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib/static) ++ RUNTIME DESTINATION ${BINDIR} ++ LIBRARY DESTINATION ${LIBDIR} ++ ARCHIVE DESTINATION ${LIBDIR}) + + INSTALL(FILES nvtt.h DESTINATION include/nvtt) + +--- src/CMakeLists.txt ++++ src/CMakeLists.txt +@@ -5,6 +5,13 @@ + SUBDIRS(nvtt) + + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) ++ ++# initial variables ++SET(GLUT TRUE CACHE BOOL "") ++SET(GLEW TRUE CACHE BOOL "") ++SET(CG TRUE CACHE BOOL "") ++SET(CUDA TRUE CACHE BOOL "") ++SET(OPENEXR TRUE CACHE BOOL "") + + # OpenGL + INCLUDE(FindOpenGL) +@@ -15,13 +22,15 @@ + ENDIF(OPENGL_FOUND) + + # GLUT +-INCLUDE(${NV_CMAKE_DIR}/FindGLUT.cmake) +-#INCLUDE(FindGLUT) +-IF(GLUT_FOUND) +- MESSAGE(STATUS "Looking for GLUT - found") +-ELSE(GLUT_FOUND) +- MESSAGE(STATUS "Looking for GLUT - not found") +-ENDIF(GLUT_FOUND) ++IF(GLUT) ++ INCLUDE(${NV_CMAKE_DIR}/FindGLUT.cmake) ++ #INCLUDE(FindGLUT) ++ IF(GLUT_FOUND) ++ MESSAGE(STATUS "Looking for GLUT - found") ++ ELSE(GLUT_FOUND) ++ MESSAGE(STATUS "Looking for GLUT - not found") ++ ENDIF(GLUT_FOUND) ++ENDIF(GLUT) + + # DirectX + INCLUDE(${NV_CMAKE_DIR}/FindDirectX.cmake) +@@ -32,29 +41,35 @@ + ENDIF(DX10_FOUND) + + # GLEW +-INCLUDE(${NV_CMAKE_DIR}/FindGLEW.cmake) +-IF(GLEW_FOUND) +- MESSAGE(STATUS "Looking for GLEW - found") +-ELSE(GLEW_FOUND) +- MESSAGE(STATUS "Looking for GLEW - not found") +-ENDIF(GLEW_FOUND) ++IF(GLEW) ++ INCLUDE(${NV_CMAKE_DIR}/FindGLEW.cmake) ++ IF(GLEW_FOUND) ++ MESSAGE(STATUS "Looking for GLEW - found") ++ ELSE(GLEW_FOUND) ++ MESSAGE(STATUS "Looking for GLEW - not found") ++ ENDIF(GLEW_FOUND) ++ENDIF(GLEW) + + # Cg +-INCLUDE(${NV_CMAKE_DIR}/FindCg.cmake) +-IF(CG_FOUND) +- MESSAGE(STATUS "Looking for Cg - found") +-ELSE(CG_FOUND) +- MESSAGE(STATUS "Looking for Cg - not found") +-ENDIF(CG_FOUND) ++IF(CG) ++ INCLUDE(${NV_CMAKE_DIR}/FindCg.cmake) ++ IF(CG_FOUND) ++ MESSAGE(STATUS "Looking for Cg - found") ++ ELSE(CG_FOUND) ++ MESSAGE(STATUS "Looking for Cg - not found") ++ ENDIF(CG_FOUND) ++ENDIF(CG) + + # CUDA +-INCLUDE(${NV_CMAKE_DIR}/FindCUDA.cmake) +-IF(CUDA_FOUND) +- SET(HAVE_CUDA ${CUDA_FOUND} CACHE BOOL "Set to TRUE if CUDA is found, FALSE otherwise") +- MESSAGE(STATUS "Looking for CUDA - found") +-ELSE(CUDA_FOUND) +- MESSAGE(STATUS "Looking for CUDA - not found") +-ENDIF(CUDA_FOUND) ++IF(CUDA) ++ INCLUDE(${NV_CMAKE_DIR}/FindCUDA.cmake) ++ IF(CUDA_FOUND) ++ SET(HAVE_CUDA ${CUDA_FOUND} CACHE BOOL "Set to TRUE if CUDA is found, FALSE otherwise") ++ MESSAGE(STATUS "Looking for CUDA - found") ++ ELSE(CUDA_FOUND) ++ MESSAGE(STATUS "Looking for CUDA - not found") ++ ENDIF(CUDA_FOUND) ++ENDIF(CUDA) + + # Maya + INCLUDE(${NV_CMAKE_DIR}/FindMaya.cmake) +@@ -93,13 +108,15 @@ + ENDIF(TIFF_FOUND) + + # OpenEXR +-INCLUDE(${NV_CMAKE_DIR}/FindOpenEXR.cmake) +-IF(OPENEXR_FOUND) +- SET(HAVE_OPENEXR ${OPENEXR_FOUND} CACHE BOOL "Set to TRUE if OpenEXR is found, FALSE otherwise") +- MESSAGE(STATUS "Looking for OpenEXR - found") +-ELSE(OPENEXR_FOUND) +- MESSAGE(STATUS "Looking for OpenEXR - not found") +-ENDIF(OPENEXR_FOUND) ++IF(OPENEXR) ++ INCLUDE(${NV_CMAKE_DIR}/FindOpenEXR.cmake) ++ IF(OPENEXR_FOUND) ++ SET(HAVE_OPENEXR ${OPENEXR_FOUND} CACHE BOOL "Set to TRUE if OpenEXR is found, FALSE otherwise") ++ MESSAGE(STATUS "Looking for OpenEXR - found") ++ ELSE(OPENEXR_FOUND) ++ MESSAGE(STATUS "Looking for OpenEXR - not found") ++ ENDIF(OPENEXR_FOUND) ++ENDIF(OPENEXR) + + # Qt + FIND_PACKAGE(Qt4) Index: /ps/trunk/libraries/nvtt/build.sh =================================================================== --- /ps/trunk/libraries/nvtt/build.sh (revision 11501) +++ /ps/trunk/libraries/nvtt/build.sh (revision 11502) @@ -12,5 +12,5 @@ cd src/build/ -cmake .. -DNVTT_SHARED=1 -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles" +cmake .. -DNVTT_SHARED=1 -DCMAKE_BUILD_TYPE=Release -DBINDIR=bin -DLIBDIR=lib -DGLUT=0 -DGLEW=0 -DCG=0 -DCUDA=0 -DOPENEXR=0 -G "Unix Makefiles" ${MAKE} nvtt ${JOBS} Index: /ps/trunk/libraries/nvtt/README.txt =================================================================== --- /ps/trunk/libraries/nvtt/README.txt (revision 11501) +++ /ps/trunk/libraries/nvtt/README.txt (revision 11502) @@ -10,2 +10,3 @@ cmake-freebsd.patch (fixes build on FreeBSD) gcc47-unistd.patch (fixes build on GCC 4.7) + cmake-depflags.patch (from https://407191.bugs.gentoo.org/attachment.cgi?id=308589 - allows disabling various dependencies)