[yast-commit] r46878 - in /trunk/devtools/devtools/cmake/modules: FindYast.cmake Makefile.am YastCommon.cmake
Author: dmacvicar Date: Sun Apr 20 22:34:53 2008 New Revision: 46878 URL: http://svn.opensuse.org/viewcvs/yast?rev=46878&view=rev Log: install these out of devtools data start adding functions to compile agents move the libX detection code to YastCommon Modified: trunk/devtools/devtools/cmake/modules/FindYast.cmake trunk/devtools/devtools/cmake/modules/Makefile.am trunk/devtools/devtools/cmake/modules/YastCommon.cmake Modified: trunk/devtools/devtools/cmake/modules/FindYast.cmake URL: http://svn.opensuse.org/viewcvs/yast/trunk/devtools/devtools/cmake/modules/FindYast.cmake?rev=46878&r1=46877&r2=46878&view=diff ============================================================================== --- trunk/devtools/devtools/cmake/modules/FindYast.cmake (original) +++ trunk/devtools/devtools/cmake/modules/FindYast.cmake Sun Apr 20 22:34:53 2008 @@ -10,24 +10,7 @@ # YAST_YCP_LIBRARY # -# set /usr as default prefix if not set -IF ( DEFINED CMAKE_INSTALL_PREFIX ) - MESSAGE(STATUS "prefix set to ${CMAKE_INSTALL_PREFIX}") -ELSE ( DEFINED CMAKE_INSTALL_PREFIX ) - SET(CMAKE_INSTALL_PREFIX /usr) - MESSAGE(STATUS "No prefix, set to default /usr") -ENDIF ( DEFINED CMAKE_INSTALL_PREFIX ) - -# Library -IF ( DEFINED LIB ) - SET ( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB}" ) -ELSE ( DEFINED LIB ) - IF (CMAKE_SIZEOF_VOID_P MATCHES "8") - SET( LIB_SUFFIX "64" ) - ENDIF(CMAKE_SIZEOF_VOID_P MATCHES "8") - SET ( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" ) -ENDIF ( DEFINED LIB ) -MESSAGE(STATUS "Libraries will be installed in ${LIB_INSTALL_DIR}" ) +include(YaSTCommon) if(YAST_INCLUDE_DIR AND YAST_LIBRARY AND YAST_YCP_LIBRARY) # Already in cache, be silent @@ -44,10 +27,6 @@ /usr/local/include/YaST2 ) -SET(YAST_PLUGIN_DIR ${LIB_INSTALL_DIR}/YaST2/plugin) -SET(YAST_IMAGE_DIR ${CMAKE_INSTALL_PREFIX}/YaST2/plugin) -SET(YAST_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/YaST2/data) - FIND_LIBRARY(YAST_LIBRARY NAMES y2 PATHS ${LIB_INSTALL_DIR} @@ -87,7 +66,7 @@ /usr/local/lib ) -SET(CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/share/YaST2/data/devtools/cmake/modules" ${CMAKE_MODULE_PATH}) +#SET(CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/share/YaST2/data/devtools/cmake/modules" ${CMAKE_MODULE_PATH}) if(YAST_INCLUDE_DIR AND YAST_LIBRARY AND YAST_YCP_LIBRARY) MESSAGE( STATUS "YaST2 found: includes in ${YAST_INCLUDE_DIR}, library in ${YAST_LIBRARY}") Modified: trunk/devtools/devtools/cmake/modules/Makefile.am URL: http://svn.opensuse.org/viewcvs/yast/trunk/devtools/devtools/cmake/modules/Makefile.am?rev=46878&r1=46877&r2=46878&view=diff ============================================================================== --- trunk/devtools/devtools/cmake/modules/Makefile.am (original) +++ trunk/devtools/devtools/cmake/modules/Makefile.am Sun Apr 20 22:34:53 2008 @@ -1,7 +1,5 @@ cmakedir = $(datadir)/cmake/Modules -ycmakedir = @YAST2DEVTOOLS@/cmake/modules -cmake_DATA = FindYast.cmake -ycmake_DATA = YastCommon.cmake +cmake_DATA = FindYast.cmake YastCommon.cmake -EXTRA_DIST = $(cmake_DATA) $(ycmake_DATA) +EXTRA_DIST = $(cmake_DATA) Modified: trunk/devtools/devtools/cmake/modules/YastCommon.cmake URL: http://svn.opensuse.org/viewcvs/yast/trunk/devtools/devtools/cmake/modules/YastCommon.cmake?rev=46878&r1=46877&r2=46878&view=diff ============================================================================== --- trunk/devtools/devtools/cmake/modules/YastCommon.cmake (original) +++ trunk/devtools/devtools/cmake/modules/YastCommon.cmake Sun Apr 20 22:34:53 2008 @@ -5,8 +5,33 @@ SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) #SET(CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/cmake/Modules ${CMAKE_MODULE_PATH}) +# set /usr as default prefix if not set +IF ( DEFINED CMAKE_INSTALL_PREFIX ) + MESSAGE(STATUS "prefix set to ${CMAKE_INSTALL_PREFIX}") +ELSE ( DEFINED CMAKE_INSTALL_PREFIX ) + SET(CMAKE_INSTALL_PREFIX /usr) + MESSAGE(STATUS "No prefix, set to default /usr") +ENDIF ( DEFINED CMAKE_INSTALL_PREFIX ) + +# Library +IF ( DEFINED LIB ) + SET ( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB}" ) +ELSE ( DEFINED LIB ) + IF (CMAKE_SIZEOF_VOID_P MATCHES "8") + SET( LIB_SUFFIX "64" ) + ENDIF(CMAKE_SIZEOF_VOID_P MATCHES "8") + SET ( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" ) +ENDIF ( DEFINED LIB ) +MESSAGE(STATUS "Libraries will be installed in ${LIB_INSTALL_DIR}" ) + +SET(YAST_PLUGIN_DIR ${LIB_INSTALL_DIR}/YaST2/plugin) +SET(YAST_IMAGE_DIR ${CMAKE_INSTALL_PREFIX}/YaST2/plugin) +SET(YAST_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/YaST2/data) + + IF (NOT DEFINED RPMNAME) FILE(READ "${CMAKE_SOURCE_DIR}/RPMNAME" RPMNAME) + STRING(REPLACE "\n" "" RPMNAME ${RPMNAME}) ENDIF (NOT DEFINED RPMNAME) MESSAGE(STATUS "package name set to '${RPMNAME}'") @@ -149,4 +174,19 @@ ) ENDMACRO(GENERATE_PACKAGING) +macro(y2_add_agent) + MESSAGE(STATUS "${ARGV0} ${ARGV2}") + set(name ${ARGV0}) + set(srcs ${ARGV1}) + if(NOT srcs) + file( GLOB srcs ${CMAKE_CURRENT_SOURCE_DIR}/*.cc ) + MESSAGE(STATUS "${srcs}") + endif(NOT srcs) + add_library(pyag_${name} SHARED ${srcs}) + SET_TARGET_PROPERTIES( pyag_${name} PROPERTIES VERSION 2.0 ) + SET_TARGET_PROPERTIES( pyag_${name} PROPERTIES SOVERSION 2 ) + add_definitions(-DY2LOG=\\\"pyag_${name}\\\") + install(TARGETS pyag_${name} DESTINATION YAST_PLUGIN_DIR) +endmacro(y2_add_agent) + -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
dmacvicar@svn.opensuse.org