diff --git a/CMakeLists.txt b/CMakeLists.txt index e6ca68c..8a57ac8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,3 +16,32 @@ include_directories(${EIGEN3_INCLUDE_DIR}) add_executable(QGLViz src/main.cpp) qt5_use_modules(QGLViz Widgets OpenGL) target_link_libraries(QGLViz ${QT_LIBRARIES} ${OPENGL_LIBRARIES}) + +# Install +install(TARGETS QGLViz + DESTINATION bin) + +set(CMAKE_PROJECT_NAME "QGLViz") +include(${CMAKE_CURRENT_SOURCE_DIR}/version.cmake) +if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") +include(InstallRequiredSystemLibraries) +set(CPACK_SET_DESTDIR "on") +set(CPACK_PACKAGING_INSTALL_PREFIX "/tmp") +set(CPACK_GENERATOR "DEB") +set(CPACK_PACKAGE_DESCRIPTION "QGLViz my own viz") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "It's a POC of what a visaualization tool could be") +set(CPACK_PACKAGE_VENDOR "beuzecorp") +set(CPACK_PACKAGE_CONTACT "guillaume.beuzeboc@gmail.com") +set(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}") +set(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}") +set(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}") +set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}.${CPACK_PACKAGE_VERSION_PATCH}") +set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}.${CPACK_PACKAGE_VERSION_PATCH}") + +set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) # auto detect dependencies + +set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") +set(CPACK_DEBIAN_PACKAGE_SECTION "beuz") +set(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR}) +include(CPack) +ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") diff --git a/version.cmake b/version.cmake new file mode 100644 index 0000000..e64dbbc --- /dev/null +++ b/version.cmake @@ -0,0 +1,3 @@ +set(MAJOR_VERSION "1") +set(MINOR_VERSION "0") +set(PATCH_VERSION "0")