Fix spec and makefiles
authorMichael Andres <ma@suse.de>
Fri, 20 Apr 2012 10:10:47 +0000 (12:10 +0200)
committerMichael Andres <ma@suse.de>
Fri, 20 Apr 2012 10:10:47 +0000 (12:10 +0200)
CMakeLists.txt
devel/devel.ma/CMakeLists.txt
doc/autodoc/CMakeLists.txt
libzypp.spec.cmake

index b879512..587f154 100644 (file)
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 2.6)
 
 
 OPTION (DISABLE_LIBPROXY "Build without libproxy support even if package is installed?" OFF)
-
+OPTION (DISABLE_AUTODOCS "Do not require doxygen being installed (required to build autodocs)?" OFF)
 
 # allow name libraries by name mixed with full
 # paths
@@ -173,7 +173,11 @@ ENDIF( DISABLE_LIBPROXY )
 
 FIND_PROGRAM( DOXYGEN doxygen )
 IF ( NOT DOXYGEN )
-  MESSAGE( FATAL_ERROR "doxygen not found: install doxygen to build the documentation." )
+  IF ( DISABLE_AUTODOCS )
+    MESSAGE( STATUS "doxygen is not available. Can't build the documentation." )
+  ELSE ( DISABLE_AUTODOCS )
+    MESSAGE( FATAL_ERROR "doxygen not found: install doxygen to build the documentation!" )
+  ENDIF ( DISABLE_AUTODOCS )
 ELSE ( NOT DOXYGEN )
   MESSAGE( STATUS "doxygen found: ${DOXYGEN}" )
 ENDIF ( NOT DOXYGEN )
index cc6b3ed..de9776c 100644 (file)
@@ -4,17 +4,6 @@
 
 ## ############################################################
 
-INCLUDE( FindQt3 )
-IF ( NOT QT_FOUND )
-  MESSAGE( WARNING " qt3 not found" )
-ELSE ( NOT QT_FOUND )
-  ADD_DEFINITIONS( ${QT_DEFINITIONS} )
-  INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} )
-  #SET( QT_LIBRARIES
-  #"/usr/lib${LIB_SUFFIX}/qt3/lib${LIB_SUFFIX}/libqassistantclient.a;/usr/lib${LIB_SUFFIX}/qt3/lib${LIB_SUFFIX}/libqt-mt.so;-lSM;-lICE;/usr/X11R6/lib${LIB_SUFFIX}/libX11.so;/usr/X11R6/lib${LIB_SUFFIX}/libXext.so;dl;-lpthread"
-  #)
-ENDIF( NOT QT_FOUND )
-
 SET(THREAD_LIBRARY boost_thread)
 
 ## ############################################################
index 3259541..3ada491 100644 (file)
@@ -1,4 +1,6 @@
 ### ##################################################
+IF ( DOXYGEN )
+### ##################################################
 
 FIND_PROGRAM( DOT dot )
 IF ( NOT DOT )
@@ -38,7 +40,6 @@ ADD_CUSTOM_COMMAND (
 ADD_CUSTOM_TARGET( doc ALL
    DEPENDS ${DOXYGEN_OUTPUT}
 )
-ADD_DEPENDENCIES(doc zypp)
 
 ADD_CUSTOM_TARGET( doc_forced
    COMMAND ${CMAKE_COMMAND} -E echo_append "Building Documentation..."
@@ -66,4 +67,7 @@ INSTALL( FILES
 #   ${CMAKE_CURRENT_BINARY_DIR}/html
 #   DESTINATION ${DOC_INSTALL_DIR}
 #)
+### ##################################################
+ENDIF ( DOXYGEN )
+### ##################################################
 
index cb4fe0a..72a0486 100644 (file)
@@ -53,7 +53,7 @@ BuildRequires:  hal-devel
 BuildRequires:  boost-devel
 BuildRequires:  dejagnu
 BuildRequires:  doxygen
-%if %0%{?force_gcc_46}
+%if 0%{?force_gcc_46}
 BuildRequires:  gcc-c++ = 4.6
 %else
 BuildRequires:  gcc-c++ >= 4.6
@@ -207,7 +207,7 @@ Authors:
 %build
 mkdir build
 cd build
-%if %0%{?force_gcc_46}
+%if 0%{?force_gcc_46}
 export CC=gcc-4.6
 export CXX=g++-4.6
 %endif