check for deb build tools
improved check of rpm
This commit is contained in:
		@@ -42,16 +42,27 @@ SET(CPACK_DEB_COMPONENT_INSTALL 1)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
IF (UNIX)
 | 
					IF (UNIX)
 | 
				
			||||||
    FIND_PROGRAM(RPMBUILD_EXECUTABLE rpmbuild)
 | 
					    FIND_PROGRAM(RPMBUILD_EXECUTABLE rpmbuild)
 | 
				
			||||||
 | 
					    FIND_PROGRAM(DEB_EXECUTABLE dpkg)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    SET(CPACK_GENERATOR "TGZ;TBZ2;DEB")
 | 
					    message(STATUS ${DEB_EXECUTABLE})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    SET(CPACK_GENERATOR "TGZ;TBZ2")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #check if rpm build is possible
 | 
					    #check if rpm build is possible
 | 
				
			||||||
    if(NOT ${RPMBUILD_EXECUTABLE} STREQUAL "")
 | 
					    if (NOT ${RPMBUILD_EXECUTABLE} STREQUAL "RPMBUILD_EXECUTABLE-NOTFOUND")
 | 
				
			||||||
        message(STATUS "found rpm build executeable --> able to build rpm")
 | 
					        message(STATUS "found rpm build executeable --> able to build rpm")
 | 
				
			||||||
        set(CPACK_GENERATOR "${CPACK_GENERATOR};RPM")
 | 
					        set(CPACK_GENERATOR "${CPACK_GENERATOR};RPM")
 | 
				
			||||||
    endif(NOT ${RPMBUILD_EXECUTABLE} STREQUAL "")
 | 
					    else (NOT ${RPMBUILD_EXECUTABLE} STREQUAL "RPMBUILD_EXECUTABLE-NOTFOUND")
 | 
				
			||||||
 | 
					        message(STATUS "not found rpm build tools --> not building rpm")
 | 
				
			||||||
 | 
					    endif (NOT ${RPMBUILD_EXECUTABLE} STREQUAL "RPMBUILD_EXECUTABLE-NOTFOUND")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #check if deb build is possible
 | 
				
			||||||
 | 
					    if (NOT ${DEB_EXECUTABLE} STREQUAL "DEB_EXECUTABLE-NOTFOUND")
 | 
				
			||||||
 | 
					        message(STATUS "found deb build tools --> able to build deb")
 | 
				
			||||||
 | 
					        set(CPACK_GENERATOR "${CPACK_GENERATOR};DEB")
 | 
				
			||||||
 | 
					    else (NOT ${DEB_EXECUTABLE} STREQUAL "DEB_EXECUTABLE-NOTFOUND")
 | 
				
			||||||
 | 
					        message(STATUS "not found  deb build tools --> not building deb")
 | 
				
			||||||
 | 
					    endif (NOT ${DEB_EXECUTABLE} STREQUAL "DEB_EXECUTABLE-NOTFOUND")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")
 | 
					    SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")
 | 
				
			||||||
@@ -71,9 +82,6 @@ IF (UNIX)
 | 
				
			|||||||
    INCLUDE(CPack)
 | 
					    INCLUDE(CPack)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
ENDIF (UNIX)
 | 
					ENDIF (UNIX)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
add_custom_target(build-linux-packages
 | 
					add_custom_target(build-linux-packages
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user