[yast-commit] r56508 - in /trunk/ruby-bindings: CMakeLists.txt yast2-ruby-bindings.spec.in

Author: kkaempf Date: Tue Mar 31 16:22:42 2009 New Revision: 56508 URL: http://svn.opensuse.org/viewcvs/yast?rev=56508&view=rev Log: improve build requires and cmake checks Modified: trunk/ruby-bindings/CMakeLists.txt trunk/ruby-bindings/yast2-ruby-bindings.spec.in Modified: trunk/ruby-bindings/CMakeLists.txt URL: http://svn.opensuse.org/viewcvs/yast/trunk/ruby-bindings/CMakeLists.txt?rev=... ============================================================================== --- trunk/ruby-bindings/CMakeLists.txt (original) +++ trunk/ruby-bindings/CMakeLists.txt Tue Mar 31 16:22:42 2009 @@ -1,30 +1,69 @@ +# +# CMakeLists.txt for yast2/ruby-bindings +# + +cmake_minimum_required(VERSION 2.4) +if(COMMAND cmake_policy) + # escape preprocessor, see -DVERSION below + cmake_policy(SET CMP0005 OLD) +endif(COMMAND cmake_policy) + + PROJECT(yast2-ruby-bindings) SET(PACKAGE "yast2-ruby-bindings") SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O3 -Wall -Woverloaded-virtual" ) SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 -Wall" ) +# +# Where is SWIG ? +# + +FIND_PACKAGE(SWIG) +IF ( NOT SWIG_FOUND ) + FIND_PROGRAM(SWIG_EXECUTABLE NAMES swig-1.3 swig PATHS ${SWIG_DIR} ${SWIG_DIR}/.. ${SWIG_DIR}/../../bin /usr/bin /usr/local/bin ${CMAKE_INSTALL_PREFIX}/bin ) +ENDIF ( NOT SWIG_FOUND ) IF ( NOT SWIG_EXECUTABLE ) - MESSAGE( FATAL "SWIG not found." ) + MESSAGE( FATAL_ERROR "SWIG not found." ) ELSE ( NOT SWIG_EXECUTABLE ) MESSAGE( STATUS "SWIG found at ${SWIG_EXECUTABLE}" ) ENDIF ( NOT SWIG_EXECUTABLE ) -FIND_PACKAGE(Yast REQUIRED) -INCLUDE(YastCommon) +# +# Where is YaST ? +# +FIND_PACKAGE(Yast REQUIRED) +IF ( NOT YAST_LIBRARY ) + MESSAGE( FATAL_ERROR "Please install yast2-core-devel." ) +ENDIF ( NOT YAST_LIBRARY ) + +IF ( NOT YAST_PLUGIN_UI_LIBRARY ) + MESSAGE( FATAL_ERROR "YAST_PLUGIN_UI_LIBRARY not set, please install yast2-ycp-ui-bindings-devel." ) +ENDIF ( NOT YAST_PLUGIN_UI_LIBRARY ) + +# +# Where is Ruby ? +# FIND_PACKAGE(Ruby REQUIRED) - -#RUBY_RUBY_LIB_PATH -MESSAGE( STATUS "Ruby vendor arch dir: ${RUBY_VENDORARCH_DIR}" ) +IF ( NOT RUBY_EXECUTABLE ) + MESSAGE( FATAL_ERROR "Ruby not found." ) +ENDIF ( NOT RUBY_EXECUTABLE ) + +# +# -> src/ +# ADD_SUBDIRECTORY(src) +# +# packaging +# SET( RPMNAME "yast2-ruby-bindings" ) GENERATE_PACKAGING(${RPMNAME} ${VERSION}) Modified: trunk/ruby-bindings/yast2-ruby-bindings.spec.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/ruby-bindings/yast2-ruby-bindings... ============================================================================== --- trunk/ruby-bindings/yast2-ruby-bindings.spec.in (original) +++ trunk/ruby-bindings/yast2-ruby-bindings.spec.in Tue Mar 31 16:22:42 2009 @@ -19,8 +19,9 @@ # libzypp-devel is missing .la requires BuildRequires: ruby-devel Requires: yast2-core >= 2.16.37 -BuildRequires: yast2-ycp-ui-bindings-devel >= 2.16.37 +BuildRequires: yast2-core-devel >= 2.16.37 Requires: yast2-ycp-ui-bindings >= 2.16.37 +BuildRequires: yast2-ycp-ui-bindings-devel >= 2.16.37 Requires: ruby Summary: Ruby bindings for the YaST platform. -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
kkaempf@svn.opensuse.org