mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-09 13:50:05 +00:00
First pass at fixing the installation part of the Cmake build : now CMAKE_INSTALL_PREFIX can
be used as intended to specify an installation directory, which can be located anywhere on the file system. Also improved the doxygen target and made the doxy build "quiet". fixes #154
This commit is contained in:
parent
eadd1b3ce4
commit
b815aff333
@ -74,13 +74,29 @@ message(STATUS "Using cmake version ${CMAKE_VERSION}")
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Specify the default install path
|
||||
SET( CMAKE_INSTALL_PREFIX
|
||||
${PROJECT_BINARY_DIR}/ )
|
||||
if (NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
SET( CMAKE_INSTALL_PREFIX ${PROJECT_BINARY_DIR}/ )
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED CMAKE_INCDIR_BASE)
|
||||
set( CMAKE_INCDIR_BASE include )
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED CMAKE_BINDIR_BASE)
|
||||
set( CMAKE_BINDIR_BASE bin )
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED CMAKE_LIBDIR_BASE)
|
||||
set( CMAKE_LIBDIR_BASE lib )
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED CMAKE_PLUGINDIR_BASE)
|
||||
set( CMAKE_PLUGINDIR_BASE plugin )
|
||||
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.
|
||||
|
@ -51,6 +51,8 @@ Optional:
|
||||
|
||||
````
|
||||
-DCMAKE_BUILD_TYPE=[Debug|Release]
|
||||
-DCMAKE_INSTALL_PREFIX=[base path to install OpenSubdiv (default: Current directory)]
|
||||
-DCMAKE_LIBDIR_BASE=[library directory basename (default: lib)]
|
||||
-DCUDA_TOOLKIT_ROOT_DIR=[path to CUDA]
|
||||
-DPTEX_LOCATION=[path to Ptex]
|
||||
-DGLEW_LOCATION=[path to GLEW]
|
||||
|
@ -63,7 +63,7 @@ if (DOXYGEN_FOUND)
|
||||
${DOXYGEN_EXECUTABLE}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/OpenSubdiv.doxy
|
||||
WORKING_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_INSTALL_PREFIX}/include
|
||||
COMMENT "Generating API documentation with Doxygen" VERBATIM
|
||||
)
|
||||
else()
|
||||
|
@ -52,7 +52,7 @@ PROJECT_LOGO = @CMAKE_CURRENT_SOURCE_DIR@/images/openSubdivHeaderBGLef
|
||||
# If a relative path is entered, it will be relative to the location
|
||||
# where doxygen was started. If left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = ./API
|
||||
OUTPUT_DIRECTORY = @CMAKE_INSTALL_PREFIX@/documentation
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
|
||||
# 4096 sub-directories (in 2 levels) under the output directory of each output
|
||||
@ -585,7 +585,7 @@ CITE_BIB_FILES =
|
||||
# The QUIET tag can be used to turn on/off the messages that are generated
|
||||
# by doxygen. Possible values are YES and NO. If left blank NO is used.
|
||||
|
||||
QUIET = NO
|
||||
QUIET = YES
|
||||
|
||||
# The WARNINGS tag can be used to turn on/off the warning messages that are
|
||||
# generated by doxygen. Possible values are YES and NO. If left blank
|
||||
|
@ -111,3 +111,4 @@ target_link_libraries(dxViewer
|
||||
${PLATFORM_LIBRARIES}
|
||||
)
|
||||
|
||||
install(TARGETS dxViewer DESTINATION ${CMAKE_BINDIR_BASE})
|
||||
|
@ -111,3 +111,4 @@ target_link_libraries(glBatchViewer
|
||||
${PLATFORM_LIBRARIES}
|
||||
)
|
||||
|
||||
install(TARGETS glBatchViewer DESTINATION ${CMAKE_BINDIR_BASE})
|
||||
|
@ -111,3 +111,4 @@ target_link_libraries(glViewer
|
||||
${PLATFORM_LIBRARIES}
|
||||
)
|
||||
|
||||
install(TARGETS glViewer DESTINATION ${CMAKE_BINDIR_BASE})
|
||||
|
@ -82,3 +82,4 @@ target_link_libraries(limitEval
|
||||
${PLATFORM_LIBRARIES}
|
||||
)
|
||||
|
||||
install(TARGETS limitEval DESTINATION ${CMAKE_BINDIR_BASE})
|
||||
|
@ -182,3 +182,5 @@ target_link_libraries(maya_ptex_plugin
|
||||
${MAYA_OpenMayaUI_LIBRARY}
|
||||
${PLATFORM_LIBRARIES}
|
||||
)
|
||||
|
||||
install(TARGETS maya_ptex_plugin DESTINATION ${CMAKE_PLUGINDIR_BASE})
|
||||
|
@ -181,3 +181,5 @@ target_link_libraries(maya_plugin
|
||||
${MAYA_OpenMayaUI_LIBRARY}
|
||||
${PLATFORM_LIBRARIES}
|
||||
)
|
||||
|
||||
install(TARGETS maya_plugin DESTINATION ${CMAKE_PLUGINDIR_BASE})
|
||||
|
@ -111,3 +111,4 @@ target_link_libraries(paintTest
|
||||
${PLATFORM_LIBRARIES}
|
||||
)
|
||||
|
||||
install(TARGETS paintTest DESTINATION ${CMAKE_BINDIR_BASE})
|
||||
|
@ -121,3 +121,4 @@ target_link_libraries(ptexViewer
|
||||
${PLATFORM_LIBRARIES}
|
||||
)
|
||||
|
||||
install(TARGETS ptexViewer DESTINATION ${CMAKE_BINDIR_BASE})
|
||||
|
@ -108,3 +108,5 @@ target_link_libraries(simpleCpu
|
||||
${PLATFORM_LIBRARIES}
|
||||
)
|
||||
|
||||
install(TARGETS simpleCpu DESTINATION ${CMAKE_BINDIR_BASE})
|
||||
|
||||
|
@ -76,5 +76,5 @@ set(PUBLIC_HEADER_FILES
|
||||
)
|
||||
|
||||
install( FILES ${PUBLIC_HEADER_FILES}
|
||||
DESTINATION include/far
|
||||
DESTINATION ${CMAKE_INCDIR_BASE}/far
|
||||
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ )
|
||||
|
@ -76,5 +76,5 @@ set(PUBLIC_HEADER_FILES
|
||||
)
|
||||
|
||||
install( FILES ${PUBLIC_HEADER_FILES}
|
||||
DESTINATION include/hbr
|
||||
DESTINATION ${CMAKE_INCDIR_BASE}/hbr
|
||||
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ )
|
||||
|
@ -468,9 +468,14 @@ endif()
|
||||
|
||||
|
||||
install( FILES ${PUBLIC_HEADER_FILES}
|
||||
DESTINATION include/osd
|
||||
DESTINATION ${CMAKE_INCDIR_BASE}/osd
|
||||
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ )
|
||||
|
||||
install( TARGETS osd_static_cpu DESTINATION ${CMAKE_LIBDIR_BASE} )
|
||||
install( TARGETS osd_static_gpu DESTINATION ${CMAKE_LIBDIR_BASE} )
|
||||
install( TARGETS osd_dynamic_cpu DESTINATION ${CMAKE_LIBDIR_BASE} )
|
||||
install( TARGETS osd_dynamic_gpu DESTINATION ${CMAKE_LIBDIR_BASE} )
|
||||
|
||||
if (ANDROID)
|
||||
install( FILES Android.mk
|
||||
DESTINATION ${LIBRARY_OUTPUT_PATH_ROOT}
|
||||
|
@ -59,3 +59,5 @@
|
||||
add_executable(stringify
|
||||
main.cpp
|
||||
)
|
||||
|
||||
install(TARGETS stringify DESTINATION ${CMAKE_BINDIR_BASE})
|
||||
|
@ -70,3 +70,5 @@ add_executable(far_regression
|
||||
|
||||
target_link_libraries(far_regression)
|
||||
|
||||
install(TARGETS far_regression DESTINATION ${CMAKE_BINDIR_BASE})
|
||||
|
||||
|
@ -82,3 +82,5 @@ add_executable(hbr_baseline
|
||||
baseline.cpp
|
||||
)
|
||||
|
||||
install(TARGETS hbr_baseline DESTINATION ${CMAKE_BINDIR_BASE})
|
||||
install(TARGETS hbr_regression DESTINATION ${CMAKE_BINDIR_BASE})
|
||||
|
@ -87,3 +87,5 @@ add_executable(osd_regression
|
||||
target_link_libraries(osd_regression
|
||||
${PLATFORM_LIBRARIES}
|
||||
)
|
||||
|
||||
install(TARGETS osd_regression DESTINATION ${CMAKE_BINDIR_BASE})
|
||||
|
Loading…
Reference in New Issue
Block a user