Use GNUInstallDirs CMake module when installing files.
This should handle platform conventions more correctly, especially on 64-bit or multiarch systems.pull/4/head
parent
7c2ec8f80e
commit
575146b975
|
@ -1,5 +1,7 @@
|
||||||
# global
|
# global
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${OPENGL_INCLUDE_DIR}
|
${OPENGL_INCLUDE_DIR}
|
||||||
${PNG_INCLUDE_DIRS}
|
${PNG_INCLUDE_DIRS}
|
||||||
|
@ -69,8 +71,8 @@ set_target_properties(slvs PROPERTIES
|
||||||
|
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
install(TARGETS slvs
|
install(TARGETS slvs
|
||||||
LIBRARY DESTINATION lib/${CMAKE_LIBRARY_PATH} # multiarch
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
PUBLIC_HEADER DESTINATION include)
|
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# generated files
|
# generated files
|
||||||
|
@ -347,19 +349,21 @@ if(APPLE)
|
||||||
DEPENDS ${CMAKE_BINARY_DIR}/${bundle}.dmg)
|
DEPENDS ${CMAKE_BINARY_DIR}/${bundle}.dmg)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install(TARGETS solvespace
|
if(NOT WIN32)
|
||||||
RUNTIME DESTINATION bin
|
install(TARGETS solvespace
|
||||||
BUNDLE DESTINATION .)
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
BUNDLE DESTINATION .)
|
||||||
|
endif()
|
||||||
|
|
||||||
install(FILES unix/solvespace.desktop
|
install(FILES unix/solvespace.desktop
|
||||||
DESTINATION share/applications)
|
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
|
||||||
foreach(SIZE 16x16 24x24 32x32 48x48)
|
foreach(SIZE 16x16 24x24 32x32 48x48)
|
||||||
install(FILES unix/solvespace-${SIZE}.png
|
install(FILES unix/solvespace-${SIZE}.png
|
||||||
DESTINATION share/icons/hicolor/${SIZE}/apps
|
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}/apps
|
||||||
RENAME solvespace.png)
|
RENAME solvespace.png)
|
||||||
install(FILES unix/solvespace-${SIZE}.png
|
install(FILES unix/solvespace-${SIZE}.png
|
||||||
DESTINATION share/icons/hicolor/${SIZE}/mimetypes
|
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}/mimetypes
|
||||||
RENAME application.x-solvespace.png)
|
RENAME application.x-solvespace.png)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# valgrind
|
# valgrind
|
||||||
|
|
Loading…
Reference in New Issue