diff --git a/CMakeLists.txt b/CMakeLists.txt index 667018cf2..1c907ea47 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,13 @@ PROJECT( ZYPPER C CXX ) SET( PACKAGE "zypper" ) # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked +if ( ZYPP_STACK_BUILD ) + SET( CMAKE_MODULE_PATH + ${zypp-stack_SOURCE_DIR}/libzypp/cmake/modules/ + ${CMAKE_MODULE_PATH} + ) + include_directories(${ZYPP_STACK_INCLUDE_DIRS}) +else() IF (DEFINED ZYPP_PREFIX) SET( CMAKE_MODULE_PATH ${ZYPP_PREFIX}/${LIB}/cmake/Zypp/ @@ -14,6 +21,7 @@ ELSE (DEFINED ZYPP_PREFIX) ${CMAKE_MODULE_PATH} ) ENDIF (DEFINED ZYPP_PREFIX) +endif() SET( CMAKE_MODULE_PATH ${ZYPPER_SOURCE_DIR}/cmake/modules @@ -52,7 +60,15 @@ ENDIF ( LEGACY_ENABLE_LONGOPT_ABBREV ) GENERATE_PACKAGING(${PACKAGE} ${VERSION}) -FIND_PACKAGE( Zypp REQUIRED ) +if ( ZYPP_STACK_BUILD ) + set( ZYPP_FOUND 1 ) + set( ZYPP_INCLUDE_DIR ${zypp-stack_SOURCE_DIR}/libzypp ) + set( ZYPP_LIBRARY zypp ) + set( ZYPP_TUI_LIBRARY zypp-tui ) +else() + FIND_PACKAGE( Zypp REQUIRED ) +endif() + IF( ZYPP_FOUND ) INCLUDE_DIRECTORIES(${ZYPP_INCLUDE_DIR}) ELSE( ZYPP_FOUND ) diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt index 76eb7e94f..50b6afe95 100644 --- a/po/CMakeLists.txt +++ b/po/CMakeLists.txt @@ -55,13 +55,13 @@ ENDFOREACH() # creates the .gmo files out of the .po files SET( SOURCE_POT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${POT_NAME}.pot ) -ADD_CUSTOM_TARGET( translations ALL +ADD_CUSTOM_TARGET( ${PROJECT_NAME}_translations ALL COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/PotfileDiff.sh ${SOURCE_POT_FILE} ${POT_FILE} | grep '^[+-][^+-]' || true DEPENDS ${GMO_FILES} COMMENT ".pot file diff..." ) -ADD_CUSTOM_TARGET( potfile_update +ADD_CUSTOM_TARGET( ${PROJECT_NAME}_potfile_update COMMAND ./PotfileDiff.sh ${SOURCE_POT_FILE} ${POT_FILE} -q || ./PotfileUpadte.sh ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS translations diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f2f778fb8..8487fdc58 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -9,7 +9,7 @@ ADD_DEFINITIONS( -DTESTS_SRC_DIR="${CMAKE_CURRENT_SOURCE_DIR}" -DTESTS_BUILD_DIR ADD_SUBDIRECTORY( utils ) -ADD_CUSTOM_TARGET( ctest +ADD_CUSTOM_TARGET( ${PROJECT_NAME}_ctest COMMAND ctest -a )