Merge pull request #23 from openSUSE/drop_package_manager
[platform/upstream/libzypp.git] / CMakeLists.txt
index b879512..dd2fc2c 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
@@ -29,8 +29,8 @@ include(CheckCXXCompilerFlag)
 CHECK_C_COMPILER_FLAG("-Werror=format-security" CC_FORMAT_SECURITY)
 CHECK_CXX_COMPILER_FLAG("-Werror=format-security" CXX_FORMAT_SECURITY)
 
-SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden -fno-strict-aliasing -fPIC -g -Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wl,-as-needed -std=c++0x" )
-SET( CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -fno-strict-aliasing -fPIC -g -Wall -Wl,-as-needed" )
+SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden -fno-strict-aliasing -fPIC -g -rdynamic -Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wl,-as-needed -std=c++0x" )
+SET( CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -fno-strict-aliasing -fPIC -g -rdynamic -Wall -Wl,-as-needed" )
 
 set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3" )
 set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O3" )
@@ -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 )