Skip to content

Commit

Permalink
Merge pull request #2 from Guillaumebeuzeboc/dev/cpack
Browse files Browse the repository at this point in the history
Dev/cpack
  • Loading branch information
Guillaumebeuzeboc authored Jan 6, 2019
2 parents eed5bf2 + 4e68acf commit f0875b1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
29 changes: 29 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]")
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")
3 changes: 3 additions & 0 deletions version.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set(MAJOR_VERSION "1")
set(MINOR_VERSION "0")
set(PATCH_VERSION "0")

0 comments on commit f0875b1

Please sign in to comment.