Skip to content

Commit

Permalink
Switch hard coded paths to GNUInstallDirs variables.
Browse files Browse the repository at this point in the history
These directories may not be the same on all systems. Also, they
can be set by a package manager.

Signed-off by Jonathan Scruggs <j.scruggs@gmail.com>
  • Loading branch information
dracwyrm committed Aug 27, 2017
1 parent 84c0714 commit 2d25937
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/doc/CMakeLists.txt
Expand Up @@ -46,5 +46,5 @@ IF(DOXYGEN_FOUND)
add_custom_target(doc ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doxygen.txt)
add_dependencies(doc DOCUMENTED_FILES)

INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ DESTINATION share/doc/partio )
INSTALL( DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ DESTINATION ${CMAKE_INSTALL_DOCDIR} )
ENDIF(DOXYGEN_FOUND)
2 changes: 1 addition & 1 deletion src/lib/CMakeLists.txt
Expand Up @@ -52,4 +52,4 @@ endif ()
ENDIF(SEEXPR_BASE)

FILE(GLOB public_includes "*.h")
INSTALL (FILES ${public_includes} DESTINATION include)
INSTALL (FILES ${public_includes} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
2 changes: 1 addition & 1 deletion src/tests/CMakeLists.txt
Expand Up @@ -36,5 +36,5 @@ link_directories(${CMAKE_BINARY_DIR}/src/lib)
foreach(item testiterator test testcache testclonecopy testcluster teststr makecircle makeline testkdtree)
ADD_EXECUTABLE(${item} "${item}.cpp")
target_link_libraries(${item} ${PARTIO_LIBRARIES})
install(TARGETS ${item} DESTINATION share/partio/test)
install(TARGETS ${item} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/partio/test)
endforeach(item)
4 changes: 2 additions & 2 deletions src/tools/CMakeLists.txt
Expand Up @@ -41,7 +41,7 @@ IF(GLUT_FOUND AND OPENGL_FOUND)
INCLUDE_DIRECTORIES(${GLUT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
ADD_EXECUTABLE(partview partview.cpp)
target_link_libraries(partview ${PARTIO_LIBRARIES} ${GLUT_LIBRARY} ${OPENGL_LIBRARY})
install(TARGETS partview DESTINATION bin)
install(TARGETS partview DESTINATION ${CMAKE_INSTALL_BINDIR})
ENDIF(GLUT_FOUND AND OPENGL_FOUND)

ADD_EXECUTABLE(partinfo partinfo.cpp)
Expand All @@ -53,4 +53,4 @@ target_link_libraries(partconv ${PARTIO_LIBRARIES})
ADD_EXECUTABLE(partattr partattr.cpp)
target_link_libraries(partattr ${PARTIO_LIBRARIES})

install(TARGETS partattr partconv partinfo DESTINATION bin)
install(TARGETS partattr partconv partinfo DESTINATION ${CMAKE_INSTALL_BINDIR})

0 comments on commit 2d25937

Please sign in to comment.