diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e705969..cdd4cbd1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,7 @@ message(STATUS "Using cmake version ${CMAKE_VERSION}") #------------------------------------------------------------------------------- # Specify the default install path if (NOT DEFINED CMAKE_INSTALL_PREFIX) - SET( CMAKE_INSTALL_PREFIX ${PROJECT_BINARY_DIR}/ ) + SET( CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/" ) endif() if (NOT DEFINED CMAKE_INCDIR_BASE) @@ -67,37 +67,37 @@ if (NOT DEFINED CMAKE_DOCDIR_BASE) set( CMAKE_DOCDIR_BASE share/doc/opensubdiv ) else() if (IS_ABSOLUTE ${CMAKE_DOCDIR_BASE}) - set( CMAKE_DOCDIR_BASE ${CMAKE_DOCDIR_BASE} ) + set( CMAKE_DOCDIR_BASE "${CMAKE_DOCDIR_BASE}" ) else() - set( CMAKE_DOCDIR_BASE ${CMAKE_INSTALL_PREFIX}/${CMAKE_DOCDIR_BASE} ) + set( CMAKE_DOCDIR_BASE "${CMAKE_INSTALL_PREFIX}/${CMAKE_DOCDIR_BASE}" ) endif() endif() # Allow install path to be overridden for cross-compile builds if(LIBRARY_OUTPUT_PATH_ROOT) - SET( CMAKE_INSTALL_PREFIX ${LIBRARY_OUTPUT_PATH_ROOT}/ ) + SET( CMAKE_INSTALL_PREFIX "${LIBRARY_OUTPUT_PATH_ROOT}/" ) endif() # Set the directory where the executables will be stored. set(EXECUTABLE_OUTPUT_PATH - ${PROJECT_BINARY_DIR}/bin + "${PROJECT_BINARY_DIR}/bin" CACHE PATH "Directory where executables will be stored" ) # Set the directory where the libraries will be stored. set(LIBRARY_OUTPUT_PATH - ${PROJECT_BINARY_DIR}/lib + "${PROJECT_BINARY_DIR}/lib" CACHE PATH "Directory where all libraries will be stored" ) # Specify the list of directories to search for cmake modules. set(CMAKE_MODULE_PATH - ${CMAKE_CURRENT_SOURCE_DIR}/cmake + "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ) -list(APPEND CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib) +list(APPEND CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") # add the automatically determined parts of the RPATH # which point to directories outside the build tree to the install RPATH @@ -463,19 +463,19 @@ add_custom_target( public_headers ) macro(_add_doxy_headers headers) if (NOT NO_DOC AND DOXYGEN_FOUND) - file(RELATIVE_PATH path ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ) + file(RELATIVE_PATH path "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}" ) string(REPLACE "/" "_" targetpath ${path}) foreach (header ${headers}) - set(infile ${CMAKE_CURRENT_SOURCE_DIR}/${header}) - set(outfile ${CMAKE_BINARY_DIR}/public_headers/${path}/${header}) + set(infile "${CMAKE_CURRENT_SOURCE_DIR}/${header}") + set(outfile "${CMAKE_BINARY_DIR}/public_headers/${path}/${header}") set(targetname "${targetpath}_${header}") add_custom_command( OUTPUT - ${outfile} + "${outfile}" COMMAND ${CMAKE_COMMAND} ARGS @@ -484,7 +484,7 @@ macro(_add_doxy_headers headers) ${infile} ) - add_custom_target(${targetname} DEPENDS ${outfile}) + add_custom_target(${targetname} DEPENDS "${outfile}") #set_target_properties(${targetname} PROPERTIES FOLDER "public_headers/") @@ -507,20 +507,20 @@ function(_stringify src_files varname) foreach(src_file ${src_files}) - string(REGEX REPLACE ".*[.](.*)" "\\1" extension ${src_file}) + string(REGEX REPLACE ".*[.](.*)" "\\1" extension "${src_file}") if(NOT ${extension} STREQUAL "cu") - string(REGEX REPLACE "(.*)[.].*" "\\1.gen.h" inc_file ${src_file}) - list(APPEND inc_files ${inc_file}) + string(REGEX REPLACE "(.*)[.].*" "\\1.gen.h" inc_file "${src_file}") + list(APPEND inc_files "${inc_file}") add_custom_command( OUTPUT - ${CMAKE_CURRENT_BINARY_DIR}/${inc_file} + "${CMAKE_CURRENT_BINARY_DIR}/${inc_file}" COMMAND - stringify ${CMAKE_CURRENT_SOURCE_DIR}/${src_file} ${CMAKE_CURRENT_BINARY_DIR}/${inc_file} + stringify "${CMAKE_CURRENT_SOURCE_DIR}/${src_file}" "${CMAKE_CURRENT_BINARY_DIR}/${inc_file}" DEPENDS - stringify ${CMAKE_CURRENT_SOURCE_DIR}/${src_file} + stringify "${CMAKE_CURRENT_SOURCE_DIR}/${src_file}" ) endif() @@ -549,7 +549,7 @@ macro(_add_possibly_cuda_executable target) endif() if(CMAKE_COMPILER_IS_ICC) - target_link_libraries(${target} ${ICC_LIBRARIES}) + target_link_libraries(${target} "${ICC_LIBRARIES}") endif() endmacro() diff --git a/cmake/FindDXSDK.cmake b/cmake/FindDXSDK.cmake index 9cb90fb6..c5872900 100644 --- a/cmake/FindDXSDK.cmake +++ b/cmake/FindDXSDK.cmake @@ -38,10 +38,10 @@ if (WIN32) NAMES D3D11.h D3Dcompiler.h PATHS - ${DXSDK_LOCATION}/Include - $ENV{DXSDK_LOCATION}/Include - ${DXSDK_ROOT}/Include - $ENV{DXSDK_ROOT}/Include + "${DXSDK_LOCATION}/Include" + "$ENV{DXSDK_LOCATION}/Include" + "${DXSDK_ROOT}/Include" + "$ENV{DXSDK_ROOT}/Include" "C:/Program Files (x86)/Microsoft DirectX SDK*/Include" "C:/Program Files/Microsoft DirectX SDK*/Include" ) @@ -55,10 +55,10 @@ if (WIN32) find_path(LIBRARY_DIR d3d11.lib PATHS - ${DXSDK_LOCATION}/Lib/${ARCH} - $ENV{DXSDK_LOCATION}/Lib/${ARCH} - ${DXSDK_ROOT}/Lib/${ARCH} - $ENV{DXSDK_ROOT}/Lib/${ARCH} + "${DXSDK_LOCATION}/Lib/${ARCH}" + "$ENV{DXSDK_LOCATION}/Lib/${ARCH}" + "${DXSDK_ROOT}/Lib/${ARCH}" + "$ENV{DXSDK_ROOT}/Lib/${ARCH}" "C:/Program Files (x86)/Microsoft DirectX SDK*/Lib/${ARCH}" "C:/Program Files/Microsoft DirectX SDK*/Lib/${ARCH}" ) diff --git a/cmake/FindGLEW.cmake b/cmake/FindGLEW.cmake index 9107e26d..ab138542 100644 --- a/cmake/FindGLEW.cmake +++ b/cmake/FindGLEW.cmake @@ -37,21 +37,21 @@ if (WIN32) NAMES GL/glew.h PATHS - ${GLEW_LOCATION}/include - $ENV{GLEW_LOCATION}/include - $ENV{PROGRAMFILES}/GLEW/include - ${PROJECT_SOURCE_DIR}/extern/glew/include + "${GLEW_LOCATION}/include" + "$ENV{GLEW_LOCATION}/include" + "$ENV{PROGRAMFILES}/GLEW/include" + "${PROJECT_SOURCE_DIR}/extern/glew/include" DOC "The directory where GL/glew.h resides" ) find_library( GLEW_LIBRARY NAMES glew GLEW glew32s glew32 PATHS - ${GLEW_LOCATION}/lib - $ENV{GLEW_LOCATION}/lib - $ENV{PROGRAMFILES}/GLEW/lib - ${PROJECT_SOURCE_DIR}/extern/glew/bin - ${PROJECT_SOURCE_DIR}/extern/glew/lib + "${GLEW_LOCATION}/lib" + "$ENV{GLEW_LOCATION}/lib" + "$ENV{PROGRAMFILES}/GLEW/lib" + "${PROJECT_SOURCE_DIR}/extern/glew/bin" + "${PROJECT_SOURCE_DIR}/extern/glew/lib" DOC "The GLEW library") endif () @@ -60,8 +60,8 @@ if (${CMAKE_HOST_UNIX}) NAMES GL/glew.h PATHS - ${GLEW_LOCATION}/include - $ENV{GLEW_LOCATION}/include + "${GLEW_LOCATION}/include" + "$ENV{GLEW_LOCATION}/include" /usr/include /usr/local/include /sw/include @@ -73,8 +73,8 @@ if (${CMAKE_HOST_UNIX}) NAMES GLEW glew PATHS - ${GLEW_LOCATION}/lib - $ENV{GLEW_LOCATION}/lib + "${GLEW_LOCATION}/lib" + "$ENV{GLEW_LOCATION}/lib" /usr/lib64 /usr/lib /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} diff --git a/cmake/FindGLFW.cmake b/cmake/FindGLFW.cmake index 1d9ec8e6..ca470b3e 100644 --- a/cmake/FindGLFW.cmake +++ b/cmake/FindGLFW.cmake @@ -35,10 +35,10 @@ find_path( GLFW_INCLUDE_DIR GL/glfw.h GLFW/glfw3.h PATHS - ${GLFW_LOCATION}/include - $ENV{GLFW_LOCATION}/include - $ENV{PROGRAMFILES}/GLFW/include - ${OPENGL_INCLUDE_DIR} + "${GLFW_LOCATION}/include" + "$ENV{GLFW_LOCATION}/include" + "$ENV{PROGRAMFILES}/GLFW/include" + "${OPENGL_INCLUDE_DIR}" /usr/openwin/share/include /usr/openwin/include /usr/X11R6/include @@ -58,10 +58,10 @@ if (WIN32) NAMES glfw32 PATHS - ${GLFW_LOCATION}/lib - ${GLFW_LOCATION}/lib/x64 - $ENV{GLFW_LOCATION}/lib - ${OPENGL_LIBRARY_DIR} + "${GLFW_LOCATION}/lib" + "${GLFW_LOCATION}/lib/x64" + "$ENV{GLFW_LOCATION}/lib" + "${OPENGL_LIBRARY_DIR}" /usr/lib /usr/lib/w32api /usr/local/lib @@ -77,14 +77,14 @@ if (WIN32) glfw glfw3 PATHS - ${GLFW_LOCATION}/lib - ${GLFW_LOCATION}/lib/x64 - ${GLFW_LOCATION}/lib-msvc110 - $ENV{GLFW_LOCATION}/lib - ${PROJECT_SOURCE_DIR}/extern/glfw/bin - ${PROJECT_SOURCE_DIR}/extern/glfw/lib - $ENV{PROGRAMFILES}/GLFW/lib - ${OPENGL_LIBRARY_DIR} + "${GLFW_LOCATION}/lib" + "${GLFW_LOCATION}/lib/x64" + "${GLFW_LOCATION}/lib-msvc110" + "$ENV{GLFW_LOCATION}/lib" + "${PROJECT_SOURCE_DIR}/extern/glfw/bin" + "${PROJECT_SOURCE_DIR}/extern/glfw/lib" + "$ENV{PROGRAMFILES}/GLFW/lib" + "${OPENGL_LIBRARY_DIR}" DOC "The GLFW library" ) @@ -96,10 +96,10 @@ else () glfw glfw3 PATHS - ${GLFW_LOCATION}/lib - ${GLFW_LOCATION}/lib/cocoa - $ENV{GLFW_LOCATION}/lib - $ENV{GLFW_LOCATION}/lib/cocoa + "${GLFW_LOCATION}/lib" + "${GLFW_LOCATION}/lib/cocoa" + "$ENV{GLFW_LOCATION}/lib" + "$ENV{GLFW_LOCATION}/lib/cocoa" /usr/local/lib ) set(GLFW_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX") @@ -118,17 +118,17 @@ else () message(FATAL_ERROR "xf86vmode library not found - required for GLFW") endif() - list(APPEND GLFW_x11_LIBRARY ${X11_Xrandr_LIB} ${X11_Xxf86vm_LIB}) + list(APPEND GLFW_x11_LIBRARY "${X11_Xrandr_LIB}" "${X11_Xxf86vm_LIB}") find_library( GLFW_glfw_LIBRARY NAMES glfw glfw3 PATHS - ${GLFW_LOCATION}/lib - $ENV{GLFW_LOCATION}/lib - ${GLFW_LOCATION}/lib/x11 - $ENV{GLFW_LOCATION}/lib/x11 + "${GLFW_LOCATION}/lib" + "$ENV{GLFW_LOCATION}/lib" + "${GLFW_LOCATION}/lib/x11" + "$ENV{GLFW_LOCATION}/lib/x11" /usr/lib64 /usr/lib /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} @@ -148,14 +148,14 @@ set( GLFW_FOUND "NO" ) if(GLFW_INCLUDE_DIR) if(GLFW_glfw_LIBRARY) - set( GLFW_LIBRARIES ${GLFW_glfw_LIBRARY} - ${GLFW_x11_LIBRARY} - ${GLFW_cocoa_LIBRARY} - ${GLFW_iokit_LIBRARY} - ${GLFW_corevideo_LIBRARY} ) + set( GLFW_LIBRARIES "${GLFW_glfw_LIBRARY}" + "${GLFW_x11_LIBRARY}" + "${GLFW_cocoa_LIBRARY}" + "${GLFW_iokit_LIBRARY}" + "${GLFW_corevideo_LIBRARY}" ) set( GLFW_FOUND "YES" ) - set (GLFW_LIBRARY ${GLFW_LIBRARIES}) - set (GLFW_INCLUDE_PATH ${GLFW_INCLUDE_DIR}) + set (GLFW_LIBRARY "${GLFW_LIBRARIES}") + set (GLFW_INCLUDE_PATH "${GLFW_INCLUDE_DIR}") endif(GLFW_glfw_LIBRARY) diff --git a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake index 3573affa..8f7c5c0b 100644 --- a/cmake/FindIlmBase.cmake +++ b/cmake/FindIlmBase.cmake @@ -41,7 +41,7 @@ IF(NOT DEFINED ILMBASE_LOCATION) IF ( WIN32 ) # Note: This assumes that the Deploy directory has been copied # back into the IlmBase root directory. - SET( ILMBASE_LOCATION $ENV{PROGRAMFILES}/ilmbase-1.0.1/Deploy ) + SET( ILMBASE_LOCATION "$ENV{PROGRAMFILES}/ilmbase-1.0.1/Deploy" ) ENDIF() ENDIF() ENDIF() @@ -52,12 +52,12 @@ ELSE() ENDIF() SET(LIBRARY_PATHS - ${ILMBASE_LOCATION}/lib - ${ILMBASE_LOCATION}/lib/Release - ${ILMBASE_LOCATION}/lib/x64/Release - $ENV{ILMBASE_LOCATION}/lib - $ENV{ILMBASE_LOCATION}/lib/Release - $ENV{ILMBASE_LOCATION}/lib/x64/Release + "${ILMBASE_LOCATION}/lib" + "${ILMBASE_LOCATION}/lib/Release" + "${ILMBASE_LOCATION}/lib/x64/Release" + "$ENV{ILMBASE_LOCATION}/lib" + "$ENV{ILMBASE_LOCATION}/lib/Release" + "$ENV{ILMBASE_LOCATION}/lib/x64/Release" ~/Library/Frameworks /Library/Frameworks /usr/local/lib @@ -70,10 +70,10 @@ SET(LIBRARY_PATHS ) SET(INCLUDE_PATHS - ${ILMBASE_LOCATION}/include/OpenEXR/ - ${ILMBASE_LOCATION}/include - $ENV{ILMBASE_LOCATION}/include/OpenEXR/ - $ENV{ILMBASE_LOCATION}/include + "${ILMBASE_LOCATION}/include/OpenEXR/" + "${ILMBASE_LOCATION}/include" + "$ENV{ILMBASE_LOCATION}/include/OpenEXR/" + "$ENV{ILMBASE_LOCATION}/include" ~/Library/Frameworks /Library/Frameworks /usr/local/include/OpenEXR/ @@ -88,45 +88,49 @@ SET(INCLUDE_PATHS ) -FIND_PATH( ILMBASE_INCLUDE_DIR ImathMath.h - PATHS - ${INCLUDE_PATHS} - NO_DEFAULT_PATH - NO_CMAKE_ENVIRONMENT_PATH - NO_CMAKE_PATH - NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH - DOC "The directory where ImathMath.h resides" ) +FIND_PATH( ILMBASE_INCLUDE_DIR + ImathMath.h + PATHS + "${INCLUDE_PATHS}" + NO_DEFAULT_PATH + NO_CMAKE_ENVIRONMENT_PATH + NO_CMAKE_PATH + NO_SYSTEM_ENVIRONMENT_PATH + NO_CMAKE_SYSTEM_PATH + DOC "The directory where ImathMath.h resides" ) -FIND_LIBRARY( ILMBASE_IEX_LIB Iex - PATHS - ${LIBRARY_PATHS} - NO_DEFAULT_PATH - NO_CMAKE_ENVIRONMENT_PATH - NO_CMAKE_PATH - NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH - DOC "The Iex library" ) +FIND_LIBRARY( ILMBASE_IEX_LIB + Iex + PATHS + "${LIBRARY_PATHS}" + NO_DEFAULT_PATH + NO_CMAKE_ENVIRONMENT_PATH + NO_CMAKE_PATH + NO_SYSTEM_ENVIRONMENT_PATH + NO_CMAKE_SYSTEM_PATH + DOC "The Iex library" ) -FIND_LIBRARY( ILMBASE_ILMTHREAD_LIB IlmThread - PATHS - ${LIBRARY_PATHS} - NO_DEFAULT_PATH - NO_CMAKE_ENVIRONMENT_PATH - NO_CMAKE_PATH - NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH - DOC "The IlmThread library" ) +FIND_LIBRARY( ILMBASE_ILMTHREAD_LIB + IlmThread + PATHS + "${LIBRARY_PATHS}" + NO_DEFAULT_PATH + NO_CMAKE_ENVIRONMENT_PATH + NO_CMAKE_PATH + NO_SYSTEM_ENVIRONMENT_PATH + NO_CMAKE_SYSTEM_PATH + DOC "The IlmThread library" ) -FIND_LIBRARY( ILMBASE_IMATH_LIB Imath - PATHS - ${LIBRARY_PATHS} - NO_DEFAULT_PATH - NO_CMAKE_ENVIRONMENT_PATH - NO_CMAKE_PATH - NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH - DOC "The Imath library" ) +FIND_LIBRARY( ILMBASE_IMATH_LIB + Imath + PATHS + "${LIBRARY_PATHS}" + NO_DEFAULT_PATH + NO_CMAKE_ENVIRONMENT_PATH + NO_CMAKE_PATH + NO_SYSTEM_ENVIRONMENT_PATH + NO_CMAKE_SYSTEM_PATH + DOC "The Imath library" ) IF ( ${ILMBASE_IEX_LIB} STREQUAL "ILMBASE_IEX_LIB-NOTFOUND" ) @@ -146,9 +150,9 @@ IF ( ${ILMBASE_INCLUDE_DIR} STREQUAL "ILMBASE_INCLUDE_DIR-NOTFOUND" ) ENDIF() SET( ILMBASE_LIBRARIES - ${ILMBASE_IMATH_LIB} - ${ILMBASE_ILMTHREAD_LIB} - ${ILMBASE_IEX_LIB} + "${ILMBASE_IMATH_LIB}" + "${ILMBASE_ILMTHREAD_LIB}" + "${ILMBASE_IEX_LIB}" ) INCLUDE(FindPackageHandleStandardArgs) diff --git a/cmake/FindMaya.cmake b/cmake/FindMaya.cmake index f79b3413..203e05e0 100644 --- a/cmake/FindMaya.cmake +++ b/cmake/FindMaya.cmake @@ -54,8 +54,8 @@ if(APPLE) find_path(MAYA_BASE_DIR ../../devkit/include/maya/MFn.h HINTS - ${MAYA_LOCATION} - $ENV{MAYA_LOCATION} + "${MAYA_LOCATION}" + "$ENV{MAYA_LOCATION}" "/Applications/Autodesk/maya2014/Maya.app/Contents" "/Applications/Autodesk/maya2013.5/Maya.app/Contents" "/Applications/Autodesk/maya2013/Maya.app/Contents" @@ -66,9 +66,9 @@ if(APPLE) ) find_path(MAYA_LIBRARY_DIR libOpenMaya.dylib HINTS - ${MAYA_LOCATION} - $ENV{MAYA_LOCATION} - ${MAYA_BASE_DIR} + "${MAYA_LOCATION}" + "$ENV{MAYA_LOCATION}" + "${MAYA_BASE_DIR}" PATH_SUFFIXES Maya.app/contents/MacOS/ DOC @@ -80,8 +80,8 @@ if(UNIX) find_path(MAYA_BASE_DIR include/maya/MFn.h HINTS - ${MAYA_LOCATION} - $ENV{MAYA_LOCATION} + "${MAYA_LOCATION}" + "$ENV{MAYA_LOCATION}" "/usr/autodesk/maya2013-x64" "/usr/autodesk/maya2012.17-x64" "/usr/autodesk/maya2012-x64" @@ -91,9 +91,9 @@ if(UNIX) find_path(MAYA_LIBRARY_DIR libOpenMaya.so HINTS - ${MAYA_LOCATION} - $ENV{MAYA_LOCATION} - ${MAYA_BASE_DIR} + "${MAYA_LOCATION}" + "$ENV{MAYA_LOCATION}" + "${MAYA_BASE_DIR}" PATH_SUFFIXES lib/ DOC @@ -105,8 +105,8 @@ if(WIN32) find_path(MAYA_BASE_DIR include/maya/MFn.h HINTS - ${MAYA_LOCATION} - $ENV{MAYA_LOCATION} + "${MAYA_LOCATION}" + "$ENV{MAYA_LOCATION}" "C:/Program Files/Autodesk/Maya2013.5-x64" "C:/Program Files/Autodesk/Maya2013.5" "C:/Program Files (x86)/Autodesk/Maya2013.5" @@ -131,9 +131,9 @@ if(WIN32) find_path(MAYA_LIBRARY_DIR OpenMaya.lib HINTS - ${MAYA_LOCATION} - $ENV{MAYA_LOCATION} - ${MAYA_BASE_DIR} + "${MAYA_LOCATION}" + "$ENV{MAYA_LOCATION}" + "${MAYA_BASE_DIR}" PATH_SUFFIXES lib/ DOC @@ -144,9 +144,9 @@ endif(WIN32) find_path(MAYA_INCLUDE_DIR maya/MFn.h HINTS - ${MAYA_LOCATION} - $ENV{MAYA_LOCATION} - ${MAYA_BASE_DIR} + "${MAYA_LOCATION}" + "$ENV{MAYA_LOCATION}" + "${MAYA_BASE_DIR}" PATH_SUFFIXES ../../devkit/include/ include/ @@ -157,9 +157,9 @@ find_path(MAYA_INCLUDE_DIR find_path(MAYA_LIBRARY_DIR OpenMaya HINTS - ${MAYA_LOCATION} - $ENV{MAYA_LOCATION} - ${MAYA_BASE_DIR} + "${MAYA_LOCATION}" + "$ENV{MAYA_LOCATION}" + "${MAYA_BASE_DIR}" PATH_SUFFIXES ../../devkit/include/ include/ @@ -172,9 +172,9 @@ list(APPEND MAYA_INCLUDE_DIRS ${MAYA_INCLUDE_DIR}) find_path(MAYA_DEVKIT_INC_DIR GL/glext.h HINTS - ${MAYA_LOCATION} - $ENV{MAYA_LOCATION} - ${MAYA_BASE_DIR} + "${MAYA_LOCATION}" + "$ENV{MAYA_LOCATION}" + "${MAYA_BASE_DIR}" PATH_SUFFIXES /devkit/plug-ins/ DOC @@ -199,9 +199,9 @@ foreach(MAYA_LIB find_library(MAYA_${MAYA_LIB}_LIBRARY ${MAYA_LIB} HINTS - ${MAYA_LOCATION} - $ENV{MAYA_LOCATION} - ${MAYA_BASE_DIR} + "${MAYA_LOCATION}" + "$ENV{MAYA_LOCATION}" + "${MAYA_BASE_DIR}" PATH_SUFFIXES MacOS/ lib/ @@ -218,9 +218,9 @@ endforeach(MAYA_LIB) find_program(MAYA_EXECUTABLE maya HINTS - ${MAYA_LOCATION} - $ENV{MAYA_LOCATION} - ${MAYA_BASE_DIR} + "${MAYA_LOCATION}" + "$ENV{MAYA_LOCATION}" + "${MAYA_BASE_DIR}" PATH_SUFFIXES MacOS/ bin/ diff --git a/cmake/FindOpenCL.cmake b/cmake/FindOpenCL.cmake index 690ada7b..bcbcc8a5 100644 --- a/cmake/FindOpenCL.cmake +++ b/cmake/FindOpenCL.cmake @@ -105,13 +105,13 @@ elseif (UNIX) get_filename_component( OPENCL_LIB_DIR ${OPENCL_LIBRARIES} PATH ) - get_filename_component( _OPENCL_INC_CAND ${OPENCL_LIB_DIR}/../../include ABSOLUTE ) + get_filename_component( _OPENCL_INC_CAND "${OPENCL_LIB_DIR}/../../include" ABSOLUTE ) find_path( OPENCL_INCLUDE_DIRS NAMES CL/cl.h PATHS - ${_OPENCL_INC_CAND} + "${_OPENCL_INC_CAND}" "/usr/local/cuda/include" "/opt/AMDAPP/include" ENV OpenCL_INCPATH @@ -121,7 +121,7 @@ elseif (UNIX) NAMES CL/cl.hpp PATHS - ${_OPENCL_INC_CAND} + "${_OPENCL_INC_CAND}" "/usr/local/cuda/include" "/opt/AMDAPP/include" ENV OpenCL_INCPATH diff --git a/cmake/FindOpenGLES.cmake b/cmake/FindOpenGLES.cmake index 8b72892b..23b8d0a4 100644 --- a/cmake/FindOpenGLES.cmake +++ b/cmake/FindOpenGLES.cmake @@ -30,20 +30,21 @@ # OPENGLES_LIBRARIES - Link these to use OpenGLES if(ANDROID) - FIND_PATH( - OPENGLES_INCLUDE_DIR GLES2/gl2.h - ${ANDROID_STANDALONE_TOOLCHAIN}/usr/include + FIND_PATH( OPENGLES_INCLUDE_DIR + GLES2/gl2.h + "${ANDROID_STANDALONE_TOOLCHAIN}/usr/include" ) - FIND_LIBRARY( - OPENGLES_LIBRARIES NAMES GLESv2 - PATHS ${ANDROID_STANDALONE_TOOLCHAIN}/usr/lib + FIND_LIBRARY( OPENGLES_LIBRARIES + NAMES + GLESv2 + PATHS + "${ANDROID_STANDALONE_TOOLCHAIN}/usr/lib" ) elseif(IOS) - FIND_LIBRARY( - OPENGLES_FRAMEWORKS OpenGLES - ) + FIND_LIBRARY( OPENGLES_FRAMEWORKS OpenGLES ) + if(OPENGLES_FRAMEWORKS) set( OPENGLES_LIBRARIES "-framework OpenGLES" ) endif() diff --git a/cmake/FindPTex.cmake b/cmake/FindPTex.cmake index 2ae95014..be98eb7f 100644 --- a/cmake/FindPTex.cmake +++ b/cmake/FindPTex.cmake @@ -35,18 +35,18 @@ if (WIN32) NAMES Ptexture.h PATHS - ${PTEX_LOCATION}/include - $ENV{PTEX_LOCATION}/include - $ENV{PROGRAMFILES}/Ptex/include + "${PTEX_LOCATION}/include" + "$ENV{PTEX_LOCATION}/include" + "$ENV{PROGRAMFILES}/Ptex/include" /usr/include DOC "The directory where Ptexture.h resides") find_library( PTEX_LIBRARY NAMES Ptex32 Ptex32s Ptex PATHS - ${PTEX_LOCATION}/lib - $ENV{PTEX_LOCATION}/lib - $ENV{PROGRAMFILES}/Ptex/lib + "${PTEX_LOCATION}/lib" + "$ENV{PTEX_LOCATION}/lib" + "$ENV{PROGRAMFILES}/Ptex/lib" /usr/lib /usr/lib/w32api /usr/local/lib @@ -57,25 +57,25 @@ elseif (APPLE) NAMES Ptexture.h PATHS - ${PTEX_LOCATION}/include - $ENV{PTEX_LOCATION}/include + "${PTEX_LOCATION}/include" + "$ENV{PTEX_LOCATION}/include" DOC "The directory where Ptexture.h resides") find_library( PTEX_LIBRARY NAMES Ptex libPtex.a PATHS - ${PTEX_LOCATION}/lib - $ENV{PTEX_LOCATION}/lib + "${PTEX_LOCATION}/lib" + "$ENV{PTEX_LOCATION}/lib" DOC "The Ptex Library") else () find_path( PTEX_INCLUDE_DIR NAMES Ptexture.h PATHS - ${PTEX_LOCATION}/include - ${PTEX_LOCATION}/include/wdas - $ENV{PTEX_LOCATION}/include - $ENV{PTEX_LOCATION}/include/wdas + "${PTEX_LOCATION}/include" + "${PTEX_LOCATION}/include/wdas" + "$ENV{PTEX_LOCATION}/include" + "$ENV{PTEX_LOCATION}/include/wdas" /usr/include /usr/local/include /usr/openwin/share/include @@ -87,8 +87,8 @@ else () NAMES Ptex wdasPtex PATHS - ${PTEX_LOCATION}/lib - $ENV{PTEX_LOCATION}/lib + "${PTEX_LOCATION}/lib" + "$ENV{PTEX_LOCATION}/lib" /usr/lib /usr/local/lib /usr/openwin/lib diff --git a/cmake/FindTBB.cmake b/cmake/FindTBB.cmake index 162ac825..7b7af284 100644 --- a/cmake/FindTBB.cmake +++ b/cmake/FindTBB.cmake @@ -35,9 +35,9 @@ if (WIN32) NAMES tbb/tbb.h HINTS - ${TBB_LOCATION}/include - $ENV{TBB_LOCATION}/include - $ENV{PROGRAMFILES}/Intel/TBB/include + "${TBB_LOCATION}/include" + "$ENV{TBB_LOCATION}/include" + "$ENV{PROGRAMFILES}/Intel/TBB/include" /usr/include DOC "The directory where TBB headers reside") elseif (APPLE) @@ -45,16 +45,16 @@ elseif (APPLE) NAMES tbb/tbb.h HINTS - ${TBB_LOCATION}/include - $ENV{TBB_LOCATION}/include + "${TBB_LOCATION}/include" + "$ENV{TBB_LOCATION}/include" DOC "The directory where TBB headers reside") else () find_path(TBB_INCLUDE_DIR NAMES tbb/tbb.h HINTS - ${TBB_LOCATION}/include - $ENV{TBB_LOCATION}/include + "${TBB_LOCATION}/include" + "$ENV{TBB_LOCATION}/include" /usr/include /usr/local/include /usr/openwin/share/include @@ -108,20 +108,20 @@ foreach(TBB_LIB tbb tbb_debug NAMES ${TBB_LIB} HINTS - ${TBB_LOCATION}/lib - ${TBB_LOCATION}/bin - $ENV{TBB_LOCATION}/lib - $ENV{TBB_LOCATION}/bin - $ENV{PROGRAMFILES}/TBB/lib + "${TBB_LOCATION}/lib" + "${TBB_LOCATION}/bin" + "$ENV{TBB_LOCATION}/lib" + "$ENV{TBB_LOCATION}/bin" + "$ENV{PROGRAMFILES}/TBB/lib" /usr/lib /usr/lib/w32api /usr/local/lib /usr/X11R6/lib PATH_SUFFIXES - ${TBB_LIB_ARCH} - ${TBB_LIB_ARCH}/${TBB_COMPILER} - ${TBB_LIB_ARCH}/gcc4.4 - ${TBB_LIB_ARCH}/gcc4.1 + "${TBB_LIB_ARCH}" + "${TBB_LIB_ARCH}/${TBB_COMPILER}" + "${TBB_LIB_ARCH}/gcc4.4" + "${TBB_LIB_ARCH}/gcc4.1" DOC "Intel's Threading Building Blocks library") if (TBB_${TBB_LIB}_LIBRARY) diff --git a/documentation/CMakeLists.txt b/documentation/CMakeLists.txt index 976de92c..77de4808 100644 --- a/documentation/CMakeLists.txt +++ b/documentation/CMakeLists.txt @@ -26,12 +26,12 @@ # Doxygen documentation if (DOXYGEN_FOUND) - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/OpenSubdiv.doxy ${CMAKE_CURRENT_BINARY_DIR}/OpenSubdiv.doxy @ONLY) + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/OpenSubdiv.doxy" "${CMAKE_CURRENT_BINARY_DIR}/OpenSubdiv.doxy" @ONLY) add_custom_target(doc_doxy - ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/OpenSubdiv.doxy + ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/OpenSubdiv.doxy" WORKING_DIRECTORY - ${CMAKE_BINARY_DIR}/public_headers/ + "${CMAKE_BINARY_DIR}/public_headers/" DEPENDS public_headers COMMENT @@ -42,9 +42,9 @@ if (DOXYGEN_FOUND) install( DIRECTORY - ${CMAKE_CURRENT_BINARY_DIR}/doxy_html + "${CMAKE_CURRENT_BINARY_DIR}/doxy_html" DESTINATION - ${CMAKE_DOCDIR_BASE} + "${CMAKE_DOCDIR_BASE}" ) else() @@ -93,37 +93,37 @@ if (DOCUTILS_FOUND AND PYTHONINTERP_FOUND) foreach(src ${RST_FILES}) get_filename_component(BASENAME ${src} NAME_WE) - set(infile ${CMAKE_CURRENT_SOURCE_DIR}/${src}) - set(outfile ${CMAKE_CURRENT_BINARY_DIR}/${BASENAME}.html) + set(infile "${CMAKE_CURRENT_SOURCE_DIR}/${src}") + set(outfile "${CMAKE_CURRENT_BINARY_DIR}/${BASENAME}.html") add_custom_command( OUTPUT - ${outfile} + "${outfile}" COMMAND - ${RST2HTML_EXECUTABLE} + "${RST2HTML_EXECUTABLE}" ARGS --date --time --no-xml-declaration --initial-header-level=3 --strip-comments - --template=${CMAKE_CURRENT_SOURCE_DIR}/rst_template.txt + --template="${CMAKE_CURRENT_SOURCE_DIR}/rst_template.txt" --stylesheet=css/rst.css --link-stylesheet - ${infile} ${outfile} + "${infile}" "${outfile}" DEPENDS - ${infile} rst_template.txt nav_template.txt + "${infile}" rst_template.txt nav_template.txt ) - add_custom_target(${src} DEPENDS ${outfile}) + add_custom_target(${src} DEPENDS "${outfile}") list(APPEND RST_TARGETS ${src}) install( FILES - ${outfile} + "${outfile}" DESTINATION - ${CMAKE_DOCDIR_BASE} + "${CMAKE_DOCDIR_BASE}" PERMISSIONS OWNER_READ GROUP_READ WORLD_READ ) @@ -132,27 +132,27 @@ if (DOCUTILS_FOUND AND PYTHONINTERP_FOUND) # copy html files to the build area foreach(src ${HTML_FILES}) - set(infile ${CMAKE_CURRENT_SOURCE_DIR}/${src}) - set(outfile ${CMAKE_CURRENT_BINARY_DIR}/${src}) + set(infile "${CMAKE_CURRENT_SOURCE_DIR}/${src}") + set(outfile "${CMAKE_CURRENT_BINARY_DIR}/${src}") add_custom_command( OUTPUT - ${outfile} + "${outfile}" COMMAND - ${CMAKE_COMMAND} + "${CMAKE_COMMAND}" ARGS - -E copy ${infile} ${outfile} + -E copy "${infile}" "${outfile}" ) - add_custom_target( ${src} DEPENDS ${outfile}) + add_custom_target( ${src} DEPENDS "${outfile}") list(APPEND HTML_TARGETS ${src}) install( FILES - ${outfile} + "${outfile}" DESTINATION - ${CMAKE_DOCDIR_BASE} + "${CMAKE_DOCDIR_BASE}" ) endforeach() @@ -160,37 +160,37 @@ if (DOCUTILS_FOUND AND PYTHONINTERP_FOUND) # documentation can be read without an install add_custom_target(doc_html_images COMMAND - ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/images ${CMAKE_CURRENT_BINARY_DIR}/images + "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/images" "${CMAKE_CURRENT_BINARY_DIR}/images" ) add_custom_target(doc_html_css COMMAND - ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/css ${CMAKE_CURRENT_BINARY_DIR}/css + ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/css" "${CMAKE_CURRENT_BINARY_DIR}/css" ) add_custom_target(doc_tipuesearch COMMAND - ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/tipuesearch ${CMAKE_CURRENT_BINARY_DIR}/tipuesearch + ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/tipuesearch" "${CMAKE_CURRENT_BINARY_DIR}/tipuesearch" ) # build search index and insert navigation tab add_custom_target(search_index COMMAND - ${PYTHON_EXECUTABLE} - ${CMAKE_CURRENT_SOURCE_DIR}/processHtml.py - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/nav_template.txt + "${PYTHON_EXECUTABLE}" + "${CMAKE_CURRENT_SOURCE_DIR}/processHtml.py" + "${CMAKE_CURRENT_BINARY_DIR}" + "${CMAKE_CURRENT_SOURCE_DIR}/nav_template.txt" DEPENDS - ${HTML_TARGETS} - ${RST_TARGETS} + ${HTML_TARGETS} + ${RST_TARGETS} doc_tipuesearch ) add_custom_target(doc_html DEPENDS search_index - ${HTML_TARGETS} - ${RST_TARGETS} + ${HTML_TARGETS} + ${RST_TARGETS} doc_html_images doc_html_css doc_tipuesearch @@ -198,24 +198,24 @@ if (DOCUTILS_FOUND AND PYTHONINTERP_FOUND) install( DIRECTORY - ${CMAKE_CURRENT_BINARY_DIR}/tipuesearch + "${CMAKE_CURRENT_BINARY_DIR}/tipuesearch" DESTINATION - ${CMAKE_DOCDIR_BASE} + "${CMAKE_DOCDIR_BASE}" ) install( DIRECTORY - ${CMAKE_CURRENT_BINARY_DIR}/images + "${CMAKE_CURRENT_BINARY_DIR}/images" DESTINATION - ${CMAKE_DOCDIR_BASE} + "${CMAKE_DOCDIR_BASE}" ) install( DIRECTORY - ${CMAKE_CURRENT_BINARY_DIR}/css + "${CMAKE_CURRENT_BINARY_DIR}/css" DESTINATION - ${CMAKE_DOCDIR_BASE} + "${CMAKE_DOCDIR_BASE}" ) list(APPEND DOC_TARGETS doc_html) diff --git a/examples/common/CMakeLists.txt b/examples/common/CMakeLists.txt index 874b449e..666e4a7d 100644 --- a/examples/common/CMakeLists.txt +++ b/examples/common/CMakeLists.txt @@ -50,10 +50,10 @@ if( OPENGL_FOUND AND (GLEW_FOUND AND GLFW_FOUND) OR (APPLE AND GLFW_FOUND)) gl_hud.h ) - include_directories(${OPENGL_INCLUDE_DIR}) + include_directories("${OPENGL_INCLUDE_DIR}") if (GLEW_FOUND) - include_directories(${GLEW_INCLUDE_DIR}) + include_directories("${GLEW_INCLUDE_DIR}") endif() endif() @@ -69,16 +69,16 @@ if(DXSDK_FOUND) d3d11_hud.h ) - include_directories(${DXSDK_INCLUDE_DIR}) + include_directories("${DXSDK_INCLUDE_DIR}") endif() if( OPENCL_FOUND ) - include_directories(${OPENCL_INCLUDE_DIRS}) + include_directories("${OPENCL_INCLUDE_DIRS}") endif() include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv + "${PROJECT_SOURCE_DIR}/opensubdiv" ) add_library(examples_common_obj diff --git a/examples/dxPtexViewer/CMakeLists.txt b/examples/dxPtexViewer/CMakeLists.txt index d23865d4..7c08378e 100644 --- a/examples/dxPtexViewer/CMakeLists.txt +++ b/examples/dxPtexViewer/CMakeLists.txt @@ -29,16 +29,16 @@ set(SHADER_FILES ) set(PLATFORM_LIBRARIES - ${OSD_LINK_TARGET} - ${DXSDK_LIBRARIES} - ${PTEX_LIBRARY} + "${OSD_LINK_TARGET}" + "${DXSDK_LIBRARIES}" + "${PTEX_LIBRARY}" ) include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv - ${PROJECT_SOURCE_DIR}/regression - ${DXSDK_INCLUDE_DIR} - ${PTEX_INCLUDE_DIR} + "${PROJECT_SOURCE_DIR}/opensubdiv" + "${PROJECT_SOURCE_DIR}/regression" + "${DXSDK_INCLUDE_DIR}" + "${PTEX_INCLUDE_DIR}" ) set(SOURCE_FILES @@ -47,17 +47,17 @@ set(SOURCE_FILES _stringify("${SHADER_FILES}" INC_FILES) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories("${CMAKE_CURRENT_BINARY_DIR}") _add_possibly_cuda_executable(dxPtexViewer WIN32 - ${SOURCE_FILES} - ${SHADER_FILES} - ${INC_FILES} + "${SOURCE_FILES}" + "${SHADER_FILES}" + "${INC_FILES}" $ ) target_link_libraries(dxPtexViewer - ${PLATFORM_LIBRARIES} + "${PLATFORM_LIBRARIES}" ) -install(TARGETS dxPtexViewer DESTINATION ${CMAKE_BINDIR_BASE}) +install(TARGETS dxPtexViewer DESTINATION "${CMAKE_BINDIR_BASE}") diff --git a/examples/dxViewer/CMakeLists.txt b/examples/dxViewer/CMakeLists.txt index a2cab2a0..4631fd64 100644 --- a/examples/dxViewer/CMakeLists.txt +++ b/examples/dxViewer/CMakeLists.txt @@ -29,14 +29,14 @@ set(SHADER_FILES ) set(PLATFORM_LIBRARIES - ${OSD_LINK_TARGET} - ${DXSDK_LIBRARIES} + "${OSD_LINK_TARGET}" + "${DXSDK_LIBRARIES}" ) include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv - ${PROJECT_SOURCE_DIR}/regression - ${DXSDK_INCLUDE_DIR} + "${PROJECT_SOURCE_DIR}/opensubdiv" + "${PROJECT_SOURCE_DIR}/regression" + "${DXSDK_INCLUDE_DIR}" ) set(SOURCE_FILES @@ -45,17 +45,17 @@ set(SOURCE_FILES _stringify("${SHADER_FILES}" INC_FILES) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories("${CMAKE_CURRENT_BINARY_DIR}") _add_possibly_cuda_executable(dxViewer WIN32 - ${SOURCE_FILES} - ${SHADER_FILES} - ${INC_FILES} + "${SOURCE_FILES}" + "${SHADER_FILES}" + "${INC_FILES}" $ ) target_link_libraries(dxViewer - ${PLATFORM_LIBRARIES} + "${PLATFORM_LIBRARIES}" ) -install(TARGETS dxViewer DESTINATION ${CMAKE_BINDIR_BASE}) +install(TARGETS dxViewer DESTINATION "${CMAKE_BINDIR_BASE}") diff --git a/examples/facePartition/CMakeLists.txt b/examples/facePartition/CMakeLists.txt index 975a9037..59053473 100644 --- a/examples/facePartition/CMakeLists.txt +++ b/examples/facePartition/CMakeLists.txt @@ -29,41 +29,41 @@ set(SHADER_FILES ) set(PLATFORM_LIBRARIES - ${OSD_LINK_TARGET} - ${OPENGL_LIBRARY} - ${GLFW_LIBRARIES} + "${OSD_LINK_TARGET}" + "${OPENGL_LIBRARY}" + "${GLFW_LIBRARIES}" ) include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv - ${PROJECT_SOURCE_DIR}/regression - ${GLFW_INCLUDE_DIR} + "${PROJECT_SOURCE_DIR}/opensubdiv" + "${PROJECT_SOURCE_DIR}/regression" + "${GLFW_INCLUDE_DIR}" ) if ( GLEW_FOUND ) - include_directories(${GLEW_INCLUDE_DIR}) - list(APPEND PLATFORM_LIBRARIES ${GLEW_LIBRARY}) + include_directories("${GLEW_INCLUDE_DIR}") + list(APPEND PLATFORM_LIBRARIES "${GLEW_LIBRARY}") endif() if( OPENCL_FOUND ) - include_directories(${OPENCL_INCLUDE_DIRS}) + include_directories("${OPENCL_INCLUDE_DIRS}") endif() #------------------------------------------------------------------------------- _stringify("${SHADER_FILES}" INC_FILES) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories("${CMAKE_CURRENT_BINARY_DIR}") _add_glfw_executable(facePartition viewer.cpp - ${SHADER_FILES} - ${INC_FILES} + "${SHADER_FILES}" + "${INC_FILES}" $ ) target_link_libraries(facePartition - ${PLATFORM_LIBRARIES} + "${PLATFORM_LIBRARIES}" ) -install(TARGETS facePartition DESTINATION ${CMAKE_BINDIR_BASE}) +install(TARGETS facePartition DESTINATION "${CMAKE_BINDIR_BASE}") diff --git a/examples/glBatchViewer/CMakeLists.txt b/examples/glBatchViewer/CMakeLists.txt index 7f96948e..55f1eaa5 100644 --- a/examples/glBatchViewer/CMakeLists.txt +++ b/examples/glBatchViewer/CMakeLists.txt @@ -30,42 +30,42 @@ set(SHADER_FILES ) set(PLATFORM_LIBRARIES - ${OSD_LINK_TARGET} - ${OPENGL_LIBRARY} - ${GLFW_LIBRARIES} + "${OSD_LINK_TARGET}" + "${OPENGL_LIBRARY}" + "${GLFW_LIBRARIES}" ) include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv - ${PROJECT_SOURCE_DIR}/regression - ${GLFW_INCLUDE_DIR} + "${PROJECT_SOURCE_DIR}/opensubdiv" + "${PROJECT_SOURCE_DIR}/regression" + "${GLFW_INCLUDE_DIR}" ) if ( GLEW_FOUND ) - include_directories(${GLEW_INCLUDE_DIR}) - list(APPEND PLATFORM_LIBRARIES ${GLEW_LIBRARY}) + include_directories("${GLEW_INCLUDE_DIR}") + list(APPEND PLATFORM_LIBRARIES "${GLEW_LIBRARY}") endif() if( OPENCL_FOUND ) - include_directories(${OPENCL_INCLUDE_DIRS}) + include_directories("${OPENCL_INCLUDE_DIRS}") endif() _stringify("${SHADER_FILES}" INC_FILES) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories("${CMAKE_CURRENT_BINARY_DIR}") _add_glfw_executable(glBatchViewer viewer.cpp delegate.cpp effect.cpp effectRegistry.cpp - ${SHADER_FILES} - ${INC_FILES} + "${SHADER_FILES}" + "${INC_FILES}" $ ) target_link_libraries(glBatchViewer - ${PLATFORM_LIBRARIES} + "${PLATFORM_LIBRARIES}" ) -install(TARGETS glBatchViewer DESTINATION ${CMAKE_BINDIR_BASE}) +install(TARGETS glBatchViewer DESTINATION "${CMAKE_BINDIR_BASE}") diff --git a/examples/glStencilViewer/CMakeLists.txt b/examples/glStencilViewer/CMakeLists.txt index 26eae741..1d61218b 100644 --- a/examples/glStencilViewer/CMakeLists.txt +++ b/examples/glStencilViewer/CMakeLists.txt @@ -25,33 +25,33 @@ # *** glStencilViewer *** set(PLATFORM_LIBRARIES - ${OSD_LINK_TARGET} - ${GLFW_LIBRARIES} + "${OSD_LINK_TARGET}" + "${GLFW_LIBRARIES}" ) include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv - ${PROJECT_SOURCE_DIR}/regression - ${GLFW_INCLUDE_DIR} + "${PROJECT_SOURCE_DIR}/opensubdiv" + "${PROJECT_SOURCE_DIR}/regression" + "${GLFW_INCLUDE_DIR}" ) if ( GLEW_FOUND ) - include_directories(${GLEW_INCLUDE_DIR}) - list(APPEND PLATFORM_LIBRARIES ${GLEW_LIBRARY}) + include_directories("${GLEW_INCLUDE_DIR}") + list(APPEND PLATFORM_LIBRARIES "${GLEW_LIBRARY}") endif() if( OPENCL_FOUND ) - include_directories(${OPENCL_INCLUDE_DIRS}) + include_directories("${OPENCL_INCLUDE_DIRS}") endif() _add_glfw_executable(glStencilViewer main.cpp - ${INC_FILES} + "${INC_FILES}" $ ) target_link_libraries(glStencilViewer - ${PLATFORM_LIBRARIES} + "${PLATFORM_LIBRARIES}" ) -install(TARGETS glStencilViewer DESTINATION ${CMAKE_BINDIR_BASE}) +install(TARGETS glStencilViewer DESTINATION "${CMAKE_BINDIR_BASE}") diff --git a/examples/glViewer/CMakeLists.txt b/examples/glViewer/CMakeLists.txt index 0afc5029..3c9a4cce 100644 --- a/examples/glViewer/CMakeLists.txt +++ b/examples/glViewer/CMakeLists.txt @@ -30,39 +30,39 @@ set(SHADER_FILES ) set(PLATFORM_LIBRARIES - ${OSD_LINK_TARGET} - ${OPENGL_LIBRARY} - ${GLFW_LIBRARIES} + "${OSD_LINK_TARGET}" + "${OPENGL_LIBRARY}" + "${GLFW_LIBRARIES}" ) include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv - ${PROJECT_SOURCE_DIR}/regression - ${GLFW_INCLUDE_DIR} + "${PROJECT_SOURCE_DIR}/opensubdiv" + "${PROJECT_SOURCE_DIR}/regression" + "${GLFW_INCLUDE_DIR}" ) if ( GLEW_FOUND ) - include_directories(${GLEW_INCLUDE_DIR}) - list(APPEND PLATFORM_LIBRARIES ${GLEW_LIBRARY}) + include_directories("${GLEW_INCLUDE_DIR}") + list(APPEND PLATFORM_LIBRARIES "${GLEW_LIBRARY}") endif() if( OPENCL_FOUND ) - include_directories(${OPENCL_INCLUDE_DIRS}) + include_directories("${OPENCL_INCLUDE_DIRS}") endif() _stringify("${SHADER_FILES}" INC_FILES) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories("${CMAKE_CURRENT_BINARY_DIR}") _add_glfw_executable(glViewer viewer.cpp - ${SHADER_FILES} - ${INC_FILES} + "${SHADER_FILES}" + "${INC_FILES}" $ ) target_link_libraries(glViewer - ${PLATFORM_LIBRARIES} + "${PLATFORM_LIBRARIES}" ) -install(TARGETS glViewer DESTINATION ${CMAKE_BINDIR_BASE}) +install(TARGETS glViewer DESTINATION "${CMAKE_BINDIR_BASE}") diff --git a/examples/limitEval/CMakeLists.txt b/examples/limitEval/CMakeLists.txt index 197a7c2e..5cfd5eb9 100644 --- a/examples/limitEval/CMakeLists.txt +++ b/examples/limitEval/CMakeLists.txt @@ -25,33 +25,33 @@ # *** glViewer *** set(PLATFORM_LIBRARIES - ${OSD_LINK_TARGET} - ${GLFW_LIBRARIES} + "${OSD_LINK_TARGET}" + "${GLFW_LIBRARIES}" ) include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv - ${PROJECT_SOURCE_DIR}/regression - ${GLFW_INCLUDE_DIR} + "${PROJECT_SOURCE_DIR}/opensubdiv" + "${PROJECT_SOURCE_DIR}/regression" + "${GLFW_INCLUDE_DIR}" ) if ( GLEW_FOUND ) - include_directories(${GLEW_INCLUDE_DIR}) - list(APPEND PLATFORM_LIBRARIES ${GLEW_LIBRARY}) + include_directories("${GLEW_INCLUDE_DIR}") + list(APPEND PLATFORM_LIBRARIES "${GLEW_LIBRARY}") endif() if( OPENCL_FOUND ) - include_directories(${OPENCL_INCLUDE_DIRS}) + include_directories("${OPENCL_INCLUDE_DIRS}") endif() _add_glfw_executable(limitEval main.cpp - ${INC_FILES} + "${INC_FILES}" $ ) target_link_libraries(limitEval - ${PLATFORM_LIBRARIES} + "${PLATFORM_LIBRARIES}" ) -install(TARGETS limitEval DESTINATION ${CMAKE_BINDIR_BASE}) +install(TARGETS limitEval DESTINATION "${CMAKE_BINDIR_BASE}") diff --git a/examples/mayaPtexViewer/CMakeLists.txt b/examples/mayaPtexViewer/CMakeLists.txt index 5f9d7ec0..e3635f9b 100644 --- a/examples/mayaPtexViewer/CMakeLists.txt +++ b/examples/mayaPtexViewer/CMakeLists.txt @@ -37,16 +37,16 @@ if(NOT MAYA_FOUND OR NOT PTEX_FOUND) endif() set(PLATFORM_LIBRARIES - ${OSD_LINK_TARGET} - ${OPENGL_LIBRARY} - ${GLEW_LIBRARY} + "${OSD_LINK_TARGET}" + "${OPENGL_LIBRARY}" + "${GLEW_LIBRARY}" ) include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv - ${MAYA_INCLUDE_DIRS} - ${GLEW_INCLUDE_DIR} - ${PTEX_INCLUDE_DIR} + "${PROJECT_SOURCE_DIR}/opensubdiv" + "${MAYA_INCLUDE_DIRS}" + "${GLEW_INCLUDE_DIR}" + "${PTEX_INCLUDE_DIR}" ) set(SHADER_FILES @@ -93,11 +93,8 @@ endif(WIN32) #------------------------------------------------------------------------------- # CUDA code & dependencies if( CUDA_FOUND ) - list(APPEND SOURCE_FILES - cudaUtil.cpp - ) - include_directories( ${CUDA_INCLUDE_DIRS} - ) + list(APPEND SOURCE_FILES cudaUtil.cpp) + include_directories( ${CUDA_INCLUDE_DIRS} ) endif() #------------------------------------------------------------------------------- @@ -115,10 +112,10 @@ foreach(shader_file ${SHADER_FILES}) list(APPEND INC_FILES ${inc_file}) add_custom_command( - OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${inc_file} - COMMAND stringify ${CMAKE_CURRENT_SOURCE_DIR}/${shader_file} - ${CMAKE_CURRENT_SOURCE_DIR}/${inc_file} - DEPENDS stringify ${CMAKE_CURRENT_SOURCE_DIR}/${shader_file} + OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/${inc_file}" + COMMAND stringify "${CMAKE_CURRENT_SOURCE_DIR}/${shader_file}" + "${CMAKE_CURRENT_SOURCE_DIR}/${inc_file}" + DEPENDS stringify "${CMAKE_CURRENT_SOURCE_DIR}/${shader_file}" ) endforeach() @@ -128,10 +125,10 @@ add_definitions( ) add_library(maya_ptex_plugin SHARED - ${SOURCE_FILES} - ${HEADER_FILES} - ${SHADER_FILES} - ${INC_FILES} + "${SOURCE_FILES}" + "${HEADER_FILES}" + "${SHADER_FILES}" + "${INC_FILES}" ) set_target_properties(maya_ptex_plugin @@ -143,11 +140,11 @@ set_target_properties(maya_ptex_plugin ) target_link_libraries(maya_ptex_plugin - ${MAYA_Foundation_LIBRARY} - ${MAYA_OpenMaya_LIBRARY} - ${MAYA_OpenMayaRender_LIBRARY} - ${MAYA_OpenMayaUI_LIBRARY} - ${PLATFORM_LIBRARIES} + "${MAYA_Foundation_LIBRARY}" + "${MAYA_OpenMaya_LIBRARY}" + "${MAYA_OpenMayaRender_LIBRARY}" + "${MAYA_OpenMayaUI_LIBRARY}" + "${PLATFORM_LIBRARIES}" ) -install(TARGETS maya_ptex_plugin DESTINATION ${CMAKE_PLUGINDIR_BASE}) +install(TARGETS maya_ptex_plugin DESTINATION "${CMAKE_PLUGINDIR_BASE}") diff --git a/examples/mayaViewer/CMakeLists.txt b/examples/mayaViewer/CMakeLists.txt index c441496d..eec2109d 100644 --- a/examples/mayaViewer/CMakeLists.txt +++ b/examples/mayaViewer/CMakeLists.txt @@ -37,15 +37,15 @@ if(NOT MAYA_FOUND) endif() set(PLATFORM_LIBRARIES - ${OSD_LINK_TARGET} - ${OPENGL_LIBRARY} - ${GLEW_LIBRARY} + "${OSD_LINK_TARGET}" + "${OPENGL_LIBRARY}" + "${GLEW_LIBRARY}" ) include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv - ${MAYA_INCLUDE_DIRS} - ${GLEW_INCLUDE_DIR} + "${PROJECT_SOURCE_DIR}/opensubdiv" + "${MAYA_INCLUDE_DIRS}" + "${GLEW_INCLUDE_DIR}" ) set(SHADER_FILES @@ -92,11 +92,8 @@ endif(WIN32) #------------------------------------------------------------------------------- # CUDA code & dependencies if( CUDA_FOUND ) - list(APPEND SOURCE_FILES - cudaUtil.cpp - ) - include_directories( ${CUDA_INCLUDE_DIRS} - ) + list(APPEND SOURCE_FILES cudaUtil.cpp) + include_directories(${CUDA_INCLUDE_DIRS}) endif() #------------------------------------------------------------------------------- @@ -114,10 +111,10 @@ foreach(shader_file ${SHADER_FILES}) list(APPEND INC_FILES ${inc_file}) add_custom_command( - OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${inc_file} - COMMAND stringify ${CMAKE_CURRENT_SOURCE_DIR}/${shader_file} - ${CMAKE_CURRENT_SOURCE_DIR}/${inc_file} - DEPENDS stringify ${CMAKE_CURRENT_SOURCE_DIR}/${shader_file} + OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/${inc_file}" + COMMAND stringify "${CMAKE_CURRENT_SOURCE_DIR}/${shader_file}" + "${CMAKE_CURRENT_SOURCE_DIR}/${inc_file}" + DEPENDS stringify "${CMAKE_CURRENT_SOURCE_DIR}/${shader_file}" ) endforeach() @@ -127,10 +124,10 @@ add_definitions( ) add_library(maya_plugin SHARED - ${SOURCE_FILES} - ${HEADER_FILES} - ${SHADER_FILES} - ${INC_FILES} + "${SOURCE_FILES}" + "${HEADER_FILES}" + "${SHADER_FILES}" + "${INC_FILES}" ) set_target_properties(maya_plugin @@ -142,11 +139,11 @@ set_target_properties(maya_plugin ) target_link_libraries(maya_plugin - ${MAYA_Foundation_LIBRARY} - ${MAYA_OpenMaya_LIBRARY} - ${MAYA_OpenMayaRender_LIBRARY} - ${MAYA_OpenMayaUI_LIBRARY} - ${PLATFORM_LIBRARIES} + "${MAYA_Foundation_LIBRARY}" + "${MAYA_OpenMaya_LIBRARY}" + "${MAYA_OpenMayaRender_LIBRARY}" + "${MAYA_OpenMayaUI_LIBRARY}" + "${PLATFORM_LIBRARIES}" ) -install(TARGETS maya_plugin DESTINATION ${CMAKE_PLUGINDIR_BASE}) +install(TARGETS maya_plugin DESTINATION "${CMAKE_PLUGINDIR_BASE}") diff --git a/examples/osdPolySmooth/CMakeLists.txt b/examples/osdPolySmooth/CMakeLists.txt index 415ef783..4c10137d 100644 --- a/examples/osdPolySmooth/CMakeLists.txt +++ b/examples/osdPolySmooth/CMakeLists.txt @@ -37,12 +37,12 @@ if(NOT MAYA_FOUND) endif() set(PLATFORM_LIBRARIES - ${OSD_LINK_TARGET} + "${OSD_LINK_TARGET}" ) include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv - ${MAYA_INCLUDE_DIRS} + "${PROJECT_SOURCE_DIR}/opensubdiv" + "${MAYA_INCLUDE_DIRS}" ) set(SOURCE_FILES @@ -96,27 +96,27 @@ set_target_properties(maya_polySmoothNode ) target_link_libraries(maya_polySmoothNode - ${MAYA_Foundation_LIBRARY} - ${MAYA_OpenMaya_LIBRARY} - ${MAYA_OpenMayaRender_LIBRARY} - ${MAYA_OpenMayaUI_LIBRARY} - ${PLATFORM_LIBRARIES} + "${MAYA_Foundation_LIBRARY}" + "${MAYA_OpenMaya_LIBRARY}" + "${MAYA_OpenMayaRender_LIBRARY}" + "${MAYA_OpenMayaUI_LIBRARY}" + "${PLATFORM_LIBRARIES}" ) -install(TARGETS maya_polySmoothNode DESTINATION ${CMAKE_PLUGINDIR_BASE}) +install(TARGETS maya_polySmoothNode DESTINATION "${CMAKE_PLUGINDIR_BASE}") add_custom_target(maya_polySmoothNode_melScripts COMMAND - ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/osdPolySmooth.mel ${CMAKE_BINARY_DIR}/${CMAKE_LIBDIR_BASE} + ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/osdPolySmooth.mel" "${CMAKE_BINARY_DIR}/${CMAKE_LIBDIR_BASE}" DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/osdPolySmooth.mel + "${CMAKE_CURRENT_SOURCE_DIR}/osdPolySmooth.mel" ) install( FILES - ${CMAKE_BINARY_DIR}/${CMAKE_LIBDIR_BASE}/osdPolySmooth.mel + "${CMAKE_BINARY_DIR}/${CMAKE_LIBDIR_BASE}/osdPolySmooth.mel" DESTINATION - ${CMAKE_PLUGINDIR_BASE} + "${CMAKE_PLUGINDIR_BASE}" ) add_custom_target(osdPolySmoothNode diff --git a/examples/paintTest/CMakeLists.txt b/examples/paintTest/CMakeLists.txt index f1def16f..8328a609 100644 --- a/examples/paintTest/CMakeLists.txt +++ b/examples/paintTest/CMakeLists.txt @@ -30,36 +30,36 @@ set(SHADER_FILES ) set(PLATFORM_LIBRARIES - ${OSD_LINK_TARGET} - ${OPENGL_LIBRARY} - ${GLEW_LIBRARY} - ${GLFW_LIBRARIES} + "${OSD_LINK_TARGET}" + "${OPENGL_LIBRARY}" + "${GLEW_LIBRARY}" + "${GLFW_LIBRARIES}" ) include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv - ${PROJECT_SOURCE_DIR}/regression - ${GLEW_INCLUDE_DIR} - ${GLFW_INCLUDE_DIR} + "${PROJECT_SOURCE_DIR}/opensubdiv" + "${PROJECT_SOURCE_DIR}/regression" + "${GLEW_INCLUDE_DIR}" + "${GLFW_INCLUDE_DIR}" ) if( OPENCL_FOUND ) - include_directories(${OPENCL_INCLUDE_DIRS}) + include_directories("${OPENCL_INCLUDE_DIRS}") endif() _stringify("${SHADER_FILES}" INC_FILES) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories("${CMAKE_CURRENT_BINARY_DIR}") _add_glfw_executable(paintTest main.cpp - ${SHADER_FILES} - ${INC_FILES} + "${SHADER_FILES}" + "${INC_FILES}" $ ) target_link_libraries(paintTest - ${PLATFORM_LIBRARIES} + "${PLATFORM_LIBRARIES}" ) -install(TARGETS paintTest DESTINATION ${CMAKE_BINDIR_BASE}) +install(TARGETS paintTest DESTINATION "${CMAKE_BINDIR_BASE}") diff --git a/examples/ptexViewer/CMakeLists.txt b/examples/ptexViewer/CMakeLists.txt index 21c666cc..44ea7e05 100644 --- a/examples/ptexViewer/CMakeLists.txt +++ b/examples/ptexViewer/CMakeLists.txt @@ -32,10 +32,10 @@ set(SHADER_FILES ) set(PLATFORM_LIBRARIES - ${OSD_LINK_TARGET} - ${OPENGL_LIBRARY} - ${GLFW_LIBRARIES} - ${PTEX_LIBRARY} + "${OSD_LINK_TARGET}" + "${OPENGL_LIBRARY}" + "${GLFW_LIBRARIES}" + "${PTEX_LIBRARY}" ) if (APPLE) @@ -43,26 +43,26 @@ if (APPLE) endif() include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv - ${PROJECT_SOURCE_DIR}/regression - ${GLFW_INCLUDE_DIR} - ${PTEX_INCLUDE_DIR} + "${PROJECT_SOURCE_DIR}/opensubdiv" + "${PROJECT_SOURCE_DIR}/regression" + "${GLFW_INCLUDE_DIR}" + "${PTEX_INCLUDE_DIR}" ) if ( GLEW_FOUND ) - include_directories(${GLEW_INCLUDE_DIR}) - list(APPEND PLATFORM_LIBRARIES ${GLEW_LIBRARY}) + include_directories("${GLEW_INCLUDE_DIR}") + list(APPEND PLATFORM_LIBRARIES "${GLEW_LIBRARY}") endif() if( OPENCL_FOUND ) - include_directories(${OPENCL_INCLUDE_DIRS}) + include_directories("${OPENCL_INCLUDE_DIRS}") endif() # optional dependency - enables screenshots find_package(PNG) if (PNG_FOUND) - include_directories(${PNG_INCLUDE_DIRS}) - list(APPEND PLATFORM_LIBRARIES ${PNG_LIBRARIES}) + include_directories("${PNG_INCLUDE_DIRS}") + list(APPEND PLATFORM_LIBRARIES "${PNG_LIBRARIES}") add_definitions(-DOPENSUBDIV_HAS_PNG) endif() @@ -70,18 +70,18 @@ endif() _stringify("${SHADER_FILES}" INC_FILES) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories("${CMAKE_CURRENT_BINARY_DIR}") #------------------------------------------------------------------------------- _add_glfw_executable(ptexViewer viewer.cpp - ${SHADER_FILES} - ${INC_FILES} + "${SHADER_FILES}" + "${INC_FILES}" $ ) target_link_libraries(ptexViewer - ${PLATFORM_LIBRARIES} + "${PLATFORM_LIBRARIES}" ) -install(TARGETS ptexViewer DESTINATION ${CMAKE_BINDIR_BASE}) +install(TARGETS ptexViewer DESTINATION "${CMAKE_BINDIR_BASE}") diff --git a/examples/simpleCpu/CMakeLists.txt b/examples/simpleCpu/CMakeLists.txt index 9a689d3b..f84e7e56 100644 --- a/examples/simpleCpu/CMakeLists.txt +++ b/examples/simpleCpu/CMakeLists.txt @@ -29,27 +29,27 @@ set(SHADER_FILES ) set(PLATFORM_LIBRARIES - ${OSD_LINK_TARGET} - ${OPENGL_LIBRARY} - ${GLFW_LIBRARIES} + "${OSD_LINK_TARGET}" + "${OPENGL_LIBRARY}" + "${GLFW_LIBRARIES}" ) include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv - ${PROJECT_SOURCE_DIR}/regression - ${GLFW_INCLUDE_DIR} + "${PROJECT_SOURCE_DIR}/opensubdiv" + "${PROJECT_SOURCE_DIR}/regression" + "${GLFW_INCLUDE_DIR}" ) if ( GLEW_FOUND ) - include_directories(${GLEW_INCLUDE_DIR}) - list(APPEND PLATFORM_LIBRARIES ${GLEW_LIBRARY}) + include_directories("${GLEW_INCLUDE_DIR}") + list(APPEND PLATFORM_LIBRARIES "${GLEW_LIBRARY}") endif() #------------------------------------------------------------------------------- _stringify("${SHADER_FILES}" INC_FILES) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories("${CMAKE_CURRENT_BINARY_DIR}") _add_glfw_executable(simpleCpu main.cpp @@ -59,8 +59,8 @@ _add_glfw_executable(simpleCpu ) target_link_libraries(simpleCpu - ${PLATFORM_LIBRARIES} + "${PLATFORM_LIBRARIES}" ) -install(TARGETS simpleCpu DESTINATION ${CMAKE_BINDIR_BASE}) +install(TARGETS simpleCpu DESTINATION "${CMAKE_BINDIR_BASE}") diff --git a/examples/tessellateObjFile/CMakeLists.txt b/examples/tessellateObjFile/CMakeLists.txt index fe7a807a..55429e7c 100644 --- a/examples/tessellateObjFile/CMakeLists.txt +++ b/examples/tessellateObjFile/CMakeLists.txt @@ -56,11 +56,11 @@ # set(PLATFORM_LIBRARIES - ${OSD_LINK_TARGET} + "${OSD_LINK_TARGET}" ) include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv + "${PROJECT_SOURCE_DIR}/opensubdiv" ) _add_executable(tessellateObjFile @@ -70,8 +70,8 @@ _add_executable(tessellateObjFile target_link_libraries(tessellateObjFile osdutil - ${PLATFORM_LIBRARIES} + "${PLATFORM_LIBRARIES}" ) -install(TARGETS tessellateObjFile DESTINATION ${CMAKE_BINDIR_BASE}) +install(TARGETS tessellateObjFile DESTINATION "${CMAKE_BINDIR_BASE}") diff --git a/examples/uvViewer/CMakeLists.txt b/examples/uvViewer/CMakeLists.txt index 85350d3b..49b54f55 100644 --- a/examples/uvViewer/CMakeLists.txt +++ b/examples/uvViewer/CMakeLists.txt @@ -29,41 +29,41 @@ set(SHADER_FILES ) set(PLATFORM_LIBRARIES - ${OSD_LINK_TARGET} - ${OPENGL_LIBRARY} - ${GLFW_LIBRARIES} + "${OSD_LINK_TARGET}" + "${OPENGL_LIBRARY}" + "${GLFW_LIBRARIES}" ) include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv - ${PROJECT_SOURCE_DIR}/regression - ${GLFW_INCLUDE_DIR} + "${PROJECT_SOURCE_DIR}/opensubdiv" + "${PROJECT_SOURCE_DIR}/regression" + "${GLFW_INCLUDE_DIR}" ) if ( GLEW_FOUND ) - include_directories(${GLEW_INCLUDE_DIR}) - list(APPEND PLATFORM_LIBRARIES ${GLEW_LIBRARY}) + include_directories("${GLEW_INCLUDE_DIR}") + list(APPEND PLATFORM_LIBRARIES "${GLEW_LIBRARY}") endif() if( OPENCL_FOUND ) - include_directories(${OPENCL_INCLUDE_DIRS}) + include_directories("${OPENCL_INCLUDE_DIRS}") endif() #------------------------------------------------------------------------------- _stringify("${SHADER_FILES}" INC_FILES) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories("${CMAKE_CURRENT_BINARY_DIR}") _add_glfw_executable(uvViewer viewer.cpp - ${SHADER_FILES} - ${INC_FILES} + "${SHADER_FILES}" + "${INC_FILES}" $ ) target_link_libraries(uvViewer - ${PLATFORM_LIBRARIES} + "${PLATFORM_LIBRARIES}" ) -install(TARGETS uvViewer DESTINATION ${CMAKE_BINDIR_BASE}) +install(TARGETS uvViewer DESTINATION "${CMAKE_BINDIR_BASE}") diff --git a/opensubdiv/CMakeLists.txt b/opensubdiv/CMakeLists.txt index d0c2b29c..62e1f547 100644 --- a/opensubdiv/CMakeLists.txt +++ b/opensubdiv/CMakeLists.txt @@ -35,5 +35,9 @@ add_subdirectory(osd) add_subdirectory(osdutil) install( FILES version.h - DESTINATION ${CMAKE_INCDIR_BASE} - PERMISSIONS OWNER_READ GROUP_READ WORLD_READ ) + DESTINATION + "${CMAKE_INCDIR_BASE}" + PERMISSIONS + OWNER_READ + GROUP_READ + WORLD_READ ) diff --git a/opensubdiv/far/CMakeLists.txt b/opensubdiv/far/CMakeLists.txt index 5c8133b4..9b45b868 100644 --- a/opensubdiv/far/CMakeLists.txt +++ b/opensubdiv/far/CMakeLists.txt @@ -47,8 +47,14 @@ set(PUBLIC_HEADER_FILES #------------------------------------------------------------------------------- _add_doxy_headers( "${PUBLIC_HEADER_FILES}" ) -install( FILES ${PUBLIC_HEADER_FILES} - DESTINATION ${CMAKE_INCDIR_BASE}/far - PERMISSIONS OWNER_READ GROUP_READ WORLD_READ ) +install( + FILES + ${PUBLIC_HEADER_FILES} + DESTINATION + "${CMAKE_INCDIR_BASE}/far" + PERMISSIONS + OWNER_READ + GROUP_READ + WORLD_READ ) #------------------------------------------------------------------------------- diff --git a/opensubdiv/hbr/CMakeLists.txt b/opensubdiv/hbr/CMakeLists.txt index b57beada..2bfb7671 100644 --- a/opensubdiv/hbr/CMakeLists.txt +++ b/opensubdiv/hbr/CMakeLists.txt @@ -46,8 +46,14 @@ set(PUBLIC_HEADER_FILES #------------------------------------------------------------------------------- _add_doxy_headers( "${PUBLIC_HEADER_FILES}" ) -install( FILES ${PUBLIC_HEADER_FILES} - DESTINATION ${CMAKE_INCDIR_BASE}/hbr - PERMISSIONS OWNER_READ GROUP_READ WORLD_READ ) +install( + FILES + ${PUBLIC_HEADER_FILES} + DESTINATION + "${CMAKE_INCDIR_BASE}/hbr" + PERMISSIONS + OWNER_READ + GROUP_READ + WORLD_READ ) #------------------------------------------------------------------------------- diff --git a/opensubdiv/osd/CMakeLists.txt b/opensubdiv/osd/CMakeLists.txt index 79bcc2e5..94891bea 100644 --- a/opensubdiv/osd/CMakeLists.txt +++ b/opensubdiv/osd/CMakeLists.txt @@ -24,28 +24,22 @@ #------------------------------------------------------------------------------- include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv + "${PROJECT_SOURCE_DIR}/opensubdiv" ) if( DXSDK_FOUND ) include_directories( - ${DXSDK_INCLUDE_DIR} + "${DXSDK_INCLUDE_DIR}" ) endif() if( OPENGL_FOUND ) - include_directories( - ${OPENGL_INCLUDE_DIR} - ) + include_directories("${OPENGL_INCLUDE_DIR}") if (GLEW_FOUND) - include_directories( - ${GLEW_INCLUDE_DIR} - ) + include_directories("${GLEW_INCLUDE_DIR}") endif() elseif( OPENGLES_FOUND ) - include_directories( - ${OPENGLES_INCLUDE_DIR} - ) + include_directories("${OPENGLES_INCLUDE_DIR}") endif() #------------------------------------------------------------------------------- @@ -68,14 +62,11 @@ set(CPU_SOURCE_FILES drawRegistry.cpp ) -set(GPU_SOURCE_FILES -) +set(GPU_SOURCE_FILES ) -set(KERNEL_FILES -) +set(KERNEL_FILES ) -set(INC_FILES -) +set(INC_FILES ) set(PRIVATE_HEADER_FILES debug.h @@ -108,9 +99,7 @@ set(PUBLIC_HEADER_FILES #------------------------------------------------------------------------------- # platform dependent tweaks if(APPLE OR UNIX) - set(PLATFORM_COMPILE_FLAGS - -fPIC - ) + set(PLATFORM_COMPILE_FLAGS -fPIC) elseif(WIN32) endif() @@ -158,16 +147,13 @@ if( PTEX_FOUND ) ${DX_PTEX_PUBLIC_HEADERS} ) endif() - include_directories( ${PTEX_INCLUDE_DIR} ) + include_directories( "${PTEX_INCLUDE_DIR}" ) list(APPEND PLATFORM_CPU_LIBRARIES - ${PTEX_LIBRARY} + "${PTEX_LIBRARY}" ) endif() -list(APPEND DOXY_HEADER_FILES - ${GL_PTEX_PUBLIC_HEADERS} - ${DX_PTEX_PUBLIC_HEADERS} -) +list(APPEND DOXY_HEADER_FILES ${GL_PTEX_PUBLIC_HEADERS} ${DX_PTEX_PUBLIC_HEADERS}) #------------------------------------------------------------------------------- set(OPENMP_PUBLIC_HEADERS @@ -188,9 +174,7 @@ if( OPENMP_FOUND ) list(APPEND PUBLIC_HEADER_FILES ${OPENMP_PUBLIC_HEADERS}) if (CMAKE_COMPILER_IS_GNUCXX) - list(APPEND PLATFORM_CPU_LIBRARIES - gomp - ) + list(APPEND PLATFORM_CPU_LIBRARIES gomp) endif() endif() @@ -198,9 +182,8 @@ list(APPEND DOXY_HEADER_FILES ${OPENMP_PUBLIC_HEADERS}) #------------------------------------------------------------------------------- if( TBB_FOUND ) - include_directories( - ${TBB_INCLUDE_DIR} - ) + include_directories("${TBB_INCLUDE_DIR}") + list(APPEND CPU_SOURCE_FILES tbbKernel.cpp tbbComputeController.cpp @@ -214,14 +197,10 @@ if( TBB_FOUND ) tbbSmoothNormalController.h ) if (CMAKE_COMPILER_IS_GNUCXX) - list(APPEND PLATFORM_CPU_LIBRARIES - gomp - ) + list(APPEND PLATFORM_CPU_LIBRARIES gomp) endif() - list(APPEND PLATFORM_CPU_LIBRARIES - ${TBB_LIBRARIES} - ) + list(APPEND PLATFORM_CPU_LIBRARIES "${TBB_LIBRARIES}") endif() #------------------------------------------------------------------------------- @@ -268,8 +247,8 @@ if( OPENGL_FOUND OR OPENGLES_FOUND ) ) endif() list(APPEND PLATFORM_GPU_LIBRARIES - ${OPENGL_LIBRARY} - ${OPENGLES_LIBRARIES} + "${OPENGL_LIBRARY}" + "${OPENGLES_LIBRARIES}" ) endif() @@ -291,12 +270,8 @@ if( OPENGL_4_2_FOUND ) glslTransformFeedbackKernelBundle.cpp ) list(APPEND PUBLIC_HEADER_FILES ${GL_4_2_PUBLIC_HEADERS}) - list(APPEND KERNEL_FILES - glslTransformFeedbackKernel.glsl - ) - list(APPEND PLATFORM_GPU_LIBRARIES - ${GLEW_LIBRARY} - ) + list(APPEND KERNEL_FILES glslTransformFeedbackKernel.glsl) + list(APPEND PLATFORM_GPU_LIBRARIES "${GLEW_LIBRARY}") endif() list(APPEND DOXY_HEADER_FILES ${GL_4_2_PUBLIC_HEADERS}) @@ -317,12 +292,8 @@ if( OPENGL_4_3_FOUND ) glslKernelBundle.cpp ) list(APPEND PUBLIC_HEADER_FILES ${GL_4_3_PUBLIC_HEADERS}) - list(APPEND KERNEL_FILES - glslComputeKernel.glsl - ) - list(APPEND PLATFORM_GPU_LIBRARIES - ${GLEW_LIBRARY} - ) + list(APPEND KERNEL_FILES glslComputeKernel.glsl) + list(APPEND PLATFORM_GPU_LIBRARIES "${GLEW_LIBRARY}") endif() list(APPEND DOXY_HEADER_FILES ${GL_4_3_PUBLIC_HEADERS}) @@ -358,9 +329,7 @@ if( DXSDK_FOUND ) hlslPatchTransition.hlsl hlslPtexCommon.hlsl ) - list(APPEND PLATFORM_GPU_LIBRARIES - ${DXSDK_LIBRARIES} - ) + list(APPEND PLATFORM_GPU_LIBRARIES "${DXSDK_LIBRARIES}") endif() list(APPEND DOXY_HEADER_FILES ${DXSDK_PUBLIC_HEADERS}) @@ -386,14 +355,10 @@ if ( OPENCL_FOUND ) list(APPEND PLATFORM_GPU_LIBRARIES ${OPENCL_LIBRARIES} ) - include_directories( ${OPENCL_INCLUDE_DIRS} ) + include_directories( "${OPENCL_INCLUDE_DIRS}" ) if ( OPENGL_FOUND ) - list(APPEND GPU_SOURCE_FILES - clGLVertexBuffer.cpp - ) - list(APPEND PUBLIC_HEADER_FILES - clGLVertexBuffer.h - ) + list(APPEND GPU_SOURCE_FILES clGLVertexBuffer.cpp) + list(APPEND PUBLIC_HEADER_FILES clGLVertexBuffer.h) endif() endif() @@ -445,7 +410,7 @@ list(APPEND DOXY_HEADER_FILES ${CUDA_PUBLIC_HEADERS}) _stringify("${KERNEL_FILES}" INC_FILES) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories("${CMAKE_CURRENT_BINARY_DIR}") #------------------------------------------------------------------------------- source_group("Kernels" FILES ${KERNEL_FILES}) @@ -491,11 +456,11 @@ if (NOT NO_LIB) set_target_properties(osd_static_gpu PROPERTIES OUTPUT_NAME osdGPU CLEAN_DIRECT_OUTPUT 1) target_link_libraries(osd_static_gpu - ${PLATFORM_CPU_LIBRARIES} ${PLATFORM_GPU_LIBRARIES} + "${PLATFORM_CPU_LIBRARIES}" "${PLATFORM_GPU_LIBRARIES}" ) - install( TARGETS osd_static_cpu DESTINATION ${CMAKE_LIBDIR_BASE} ) - install( TARGETS osd_static_gpu DESTINATION ${CMAKE_LIBDIR_BASE} ) + install( TARGETS osd_static_cpu DESTINATION "${CMAKE_LIBDIR_BASE}" ) + install( TARGETS osd_static_gpu DESTINATION "${CMAKE_LIBDIR_BASE}" ) # Build dynamic libs ---------------------------------- if (NOT WIN32 AND NOT IOS) @@ -521,7 +486,7 @@ if (NOT NO_LIB) ) target_link_libraries(osd_dynamic_cpu - ${PLATFORM_CPU_LIBRARIES} + "${PLATFORM_CPU_LIBRARIES}" ) _add_possibly_cuda_library(osd_dynamic_gpu @@ -539,25 +504,37 @@ if (NOT NO_LIB) target_link_libraries(osd_dynamic_gpu osd_dynamic_cpu - ${PLATFORM_CPU_LIBRARIES} ${PLATFORM_GPU_LIBRARIES} + "${PLATFORM_CPU_LIBRARIES}" "${PLATFORM_GPU_LIBRARIES}" ) - install( TARGETS osd_dynamic_cpu LIBRARY DESTINATION ${CMAKE_LIBDIR_BASE} ) - install( TARGETS osd_dynamic_gpu LIBRARY DESTINATION ${CMAKE_LIBDIR_BASE} ) + install( TARGETS osd_dynamic_cpu LIBRARY DESTINATION "${CMAKE_LIBDIR_BASE}" ) + install( TARGETS osd_dynamic_gpu LIBRARY DESTINATION "${CMAKE_LIBDIR_BASE}" ) endif() endif() _add_doxy_headers( "${DOXY_HEADER_FILES}" ) -install( FILES ${PUBLIC_HEADER_FILES} - DESTINATION ${CMAKE_INCDIR_BASE}/osd - PERMISSIONS OWNER_READ GROUP_READ WORLD_READ ) +install( + FILES + ${PUBLIC_HEADER_FILES} + DESTINATION + "${CMAKE_INCDIR_BASE}/osd" + PERMISSIONS + OWNER_READ + GROUP_READ + WORLD_READ ) if (ANDROID) - install( FILES Android.mk - DESTINATION ${LIBRARY_OUTPUT_PATH_ROOT} - PERMISSIONS OWNER_READ GROUP_READ WORLD_READ ) + install( + FILES + Android.mk + DESTINATION + "${LIBRARY_OUTPUT_PATH_ROOT}" + PERMISSIONS + OWNER_READ + GROUP_READ + WORLD_READ ) endif() #------------------------------------------------------------------------------- diff --git a/opensubdiv/osdutil/CMakeLists.txt b/opensubdiv/osdutil/CMakeLists.txt index d048600b..d43f6be3 100644 --- a/opensubdiv/osdutil/CMakeLists.txt +++ b/opensubdiv/osdutil/CMakeLists.txt @@ -23,9 +23,7 @@ # #------------------------------------------------------------------------------- -include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv -) +include_directories("${PROJECT_SOURCE_DIR}/opensubdiv") #------------------------------------------------------------------------------- # source & headers @@ -64,7 +62,7 @@ set_target_properties(osdutil PROPERTIES OUTPUT_NAME osdutil CLEAN_DIRECT_OUTPUT target_link_libraries( osdutil - ${PLATFORM_LIBRARIES} + "${PLATFORM_LIBRARIES}" ) @@ -87,10 +85,16 @@ list(APPEND DOXY_HEADER_FILES ${OPENCL_PUBLIC_HEADER_FILES} ) _add_doxy_headers( "${DOXY_HEADER_FILES}" ) -install( FILES ${PUBLIC_HEADER_FILES} - DESTINATION ${CMAKE_INCDIR_BASE}/osdutil - PERMISSIONS OWNER_READ GROUP_READ WORLD_READ ) +install( + FILES + ${PUBLIC_HEADER_FILES} + DESTINATION + "${CMAKE_INCDIR_BASE}/osdutil" + PERMISSIONS + OWNER_READ + GROUP_READ + WORLD_READ ) -install( TARGETS osdutil DESTINATION ${CMAKE_LIBDIR_BASE}) +install( TARGETS osdutil DESTINATION "${CMAKE_LIBDIR_BASE}") #------------------------------------------------------------------------------- diff --git a/regression/far_regression/CMakeLists.txt b/regression/far_regression/CMakeLists.txt index c6ec5b7b..833da10d 100644 --- a/regression/far_regression/CMakeLists.txt +++ b/regression/far_regression/CMakeLists.txt @@ -22,9 +22,7 @@ # language governing permissions and limitations under the Apache License. # -include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv -) +include_directories("${PROJECT_SOURCE_DIR}/opensubdiv") set(SOURCE_FILES main.cpp @@ -37,5 +35,5 @@ _add_executable(far_regression target_link_libraries(far_regression) -install(TARGETS far_regression DESTINATION ${CMAKE_BINDIR_BASE}) +install(TARGETS far_regression DESTINATION "${CMAKE_BINDIR_BASE}") diff --git a/regression/hbr_regression/CMakeLists.txt b/regression/hbr_regression/CMakeLists.txt index 862f08a3..904270e6 100644 --- a/regression/hbr_regression/CMakeLists.txt +++ b/regression/hbr_regression/CMakeLists.txt @@ -22,9 +22,7 @@ # language governing permissions and limitations under the Apache License. # -include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv -) +include_directories("${PROJECT_SOURCE_DIR}/opensubdiv") _add_possibly_cuda_executable(hbr_regression main.cpp @@ -37,7 +35,7 @@ _add_possibly_cuda_executable(hbr_regression set(HBR_BASELINE_DIR "${PROJECT_SOURCE_DIR}/regression/hbr_regression/baseline/" ) if (WIN32) - string(REGEX REPLACE "/" "\\\\\\\\" HBR_BASELINE_DIR ${HBR_BASELINE_DIR}) + string(REGEX REPLACE "/" "\\\\\\\\" HBR_BASELINE_DIR "${HBR_BASELINE_DIR}") endif() add_definitions( @@ -49,5 +47,5 @@ _add_executable(hbr_baseline baseline.cpp ) -install(TARGETS hbr_baseline DESTINATION ${CMAKE_BINDIR_BASE}) -install(TARGETS hbr_regression DESTINATION ${CMAKE_BINDIR_BASE}) +install(TARGETS hbr_baseline DESTINATION "${CMAKE_BINDIR_BASE}") +install(TARGETS hbr_regression DESTINATION "${CMAKE_BINDIR_BASE}") diff --git a/regression/osd_regression/CMakeLists.txt b/regression/osd_regression/CMakeLists.txt index 48c86079..075aa9ef 100644 --- a/regression/osd_regression/CMakeLists.txt +++ b/regression/osd_regression/CMakeLists.txt @@ -23,8 +23,8 @@ # include_directories( - ${PROJECT_SOURCE_DIR}/opensubdiv - ${GLFW_INCLUDE_DIR} + "${PROJECT_SOURCE_DIR}/opensubdiv" + "${GLFW_INCLUDE_DIR}" ) set(SOURCE_FILES @@ -32,32 +32,32 @@ set(SOURCE_FILES ) set(PLATFORM_LIBRARIES - ${OSD_LINK_TARGET} - ${OPENGL_LIBRARY} - ${GLFW_LIBRARIES} + "${OSD_LINK_TARGET}" + "${OPENGL_LIBRARY}" + "${GLFW_LIBRARIES}" ) if ( GLEW_FOUND ) - include_directories(${GLEW_INCLUDE_DIR}) - list(APPEND PLATFORM_LIBRARIES ${GLEW_LIBRARY}) + include_directories("${GLEW_INCLUDE_DIR}") + list(APPEND PLATFORM_LIBRARIES "${GLEW_LIBRARY}") endif() if ( OPENCL_FOUND ) list(APPEND PLATFORM_LIBRARIES - ${OPENCL_LIBRARIES} + "${OPENCL_LIBRARIES}" ) - include_directories( ${OPENCL_INCLUDE_DIRS} ) + include_directories( "${OPENCL_INCLUDE_DIRS}" ) endif() _add_possibly_cuda_executable(osd_regression - ${SOURCE_FILES} + "${SOURCE_FILES}" ) add_dependencies(osd_regression blarg ) target_link_libraries(osd_regression - ${PLATFORM_LIBRARIES} + "${PLATFORM_LIBRARIES}" ) -install(TARGETS osd_regression DESTINATION ${CMAKE_BINDIR_BASE}) +install(TARGETS osd_regression DESTINATION "${CMAKE_BINDIR_BASE}")