diff --git a/MyxCMake/MyxCMakeConfig.cmake b/MyxCMake/MyxCMakeConfig.cmake index eeb0925..09bf810 100644 --- a/MyxCMake/MyxCMakeConfig.cmake +++ b/MyxCMake/MyxCMakeConfig.cmake @@ -25,7 +25,6 @@ endif() include(GNUInstallDirs) include(CMakeDependentOption) -include(${MYX_CMAKE_LIB_DIR}/macro/SkipExternalTarget.cmake) include(${MYX_CMAKE_LIB_DIR}/macro/CreateSymlink.cmake) include(${MYX_CMAKE_LIB_DIR}/macro/FindPackages.cmake) include(${MYX_CMAKE_LIB_DIR}/macro/InstallRelative.cmake) diff --git a/MyxCMake/MyxCMakeConfigVersion.cmake b/MyxCMake/MyxCMakeConfigVersion.cmake index a22e74d..4803693 100644 --- a/MyxCMake/MyxCMakeConfigVersion.cmake +++ b/MyxCMake/MyxCMakeConfigVersion.cmake @@ -1,4 +1,4 @@ -set(MYX_CMAKE_PACKAGE_VERSION "2.0.24") +set(MYX_CMAKE_PACKAGE_VERSION "2.0.25") if(MYX_CMAKE_PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) set(PACKAGE_VERSION_COMPATIBLE FALSE) else() diff --git a/MyxCMake/lib/CreatePackages.cmake b/MyxCMake/lib/CreatePackages.cmake index 137d9a9..492aaa5 100644 --- a/MyxCMake/lib/CreatePackages.cmake +++ b/MyxCMake/lib/CreatePackages.cmake @@ -1,7 +1,9 @@ include_guard(GLOBAL) function(myx_create_packages TARGET_NAME) - myx_skip_external_target(${TARGET_NAME}) + if(NOT ${PROJECT_BINARY_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + return() + endif() set(options) set(oneValueArgs DEBIAN_PACKAGE_TYPE CPACK_DEBIAN_PACKAGE_SECTION CPACK_DEBIAN_PACKAGE_PRIORITY diff --git a/MyxCMake/lib/doc/Doxygen.cmake b/MyxCMake/lib/doc/Doxygen.cmake index 6e33db8..0816e72 100644 --- a/MyxCMake/lib/doc/Doxygen.cmake +++ b/MyxCMake/lib/doc/Doxygen.cmake @@ -9,7 +9,9 @@ function(myx_doc_doxygen TARGET_NAME) set(CMAKE_CURRENT_FUNCTION_LIST_DIR ${MYX_CMAKE_LIB_DOC_DIR_BACKPORT}) endif() - myx_skip_external_target(${TARGET_NAME}) + if(NOT ${PROJECT_BINARY_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + return() + endif() find_package(Doxygen) if(DOXYGEN_FOUND) diff --git a/MyxCMake/lib/macro/SkipExternalTarget.cmake b/MyxCMake/lib/macro/SkipExternalTarget.cmake deleted file mode 100644 index a5bc7f0..0000000 --- a/MyxCMake/lib/macro/SkipExternalTarget.cmake +++ /dev/null @@ -1,29 +0,0 @@ -include_guard(GLOBAL) - -# Пропуск целей, которые создаются автоматически в `CMAKE_BINARY_DIR` -macro(myx_skip_external_target TARGET_NAME) - get_target_property(__s1 ${TARGET_NAME} INTERFACE_SOURCES) - if(__s1) - list(APPEND __sources ${__s1}) - endif() - get_target_property(__s2 ${TARGET_NAME} SOURCES) - if(__s2) - list(APPEND __sources ${__s2}) - endif() - - foreach(__iter ${__sources}) - string(FIND ${__iter} ${CMAKE_BINARY_DIR} __pos) - if(__pos GREATER -1) - unset(__type) - unset(__pos) - unset(__sources) - return() - endif() - endforeach() - unset(__iter) - unset(__type) - unset(__pos) - unset(__sources) - unset(__s2) - unset(__s1) -endmacro(myx_skip_external_target TARGET_NAME) diff --git a/MyxCMake/lib/uncrustify/Uncrustify.cmake b/MyxCMake/lib/uncrustify/Uncrustify.cmake index 66ba9f3..5ad1eb4 100644 --- a/MyxCMake/lib/uncrustify/Uncrustify.cmake +++ b/MyxCMake/lib/uncrustify/Uncrustify.cmake @@ -11,7 +11,9 @@ function(myx_uncrustify TARGET_NAME) set(CMAKE_CURRENT_FUNCTION_LIST_DIR ${MYX_CMAKE_LIB_UNCRUSTIFY_DIR_BACKPORT}) endif() - myx_skip_external_target(${TARGET_NAME}) + if(NOT ${PROJECT_BINARY_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + return() + endif() set(options) set(oneValueArgs CONFIG) diff --git a/README.md b/README.md index cd94a2f..4633a1e 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ## Установка В корневом каталоге проекта создать каталог `cmake` и распаковать в него -[архив](../../../releases/download/2.0.24/myx-cmake-local-2.0.24.tar.xz ). +[архив](../../../releases/download/2.0.25/myx-cmake-local-2.0.25.tar.xz ). ## Использование diff --git a/VERSION b/VERSION index 8f4c02d..efb4534 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.24 +2.0.25 diff --git a/debian/CMakeLists.txt b/debian/CMakeLists.txt index a985156..31e4061 100644 --- a/debian/CMakeLists.txt +++ b/debian/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.6 FATAL_ERROR) -project(myx-cmake VERSION 2.0.24 LANGUAGES) +project(myx-cmake VERSION 2.0.25 LANGUAGES) include(GNUInstallDirs) file(WRITE ${CMAKE_SOURCE_DIR}/MyxCMake/MyxCMakeConfigVersion.cmake diff --git a/debian/changelog b/debian/changelog index 6a850f8..aab097e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -myx-cmake (2.0.24) unstable; urgency=medium +myx-cmake (2.0.25) unstable; urgency=medium * New version. diff --git a/myx_setup.cmake b/myx_setup.cmake index 204a37d..240dd3f 100644 --- a/myx_setup.cmake +++ b/myx_setup.cmake @@ -20,11 +20,11 @@ if(ENV{MYX_CMAKE_DIR}) set(MYX_CMAKE_DIR $ENV{MYX_CMAKE_DIR}) endif() if(MYX_CMAKE_DIR) - find_package(MyxCMake 2.0.24 REQUIRED CONFIG PATHS ${MYX_CMAKE_DIR} NO_DEFAULT_PATH) + find_package(MyxCMake 2.0.25 REQUIRED CONFIG PATHS ${MYX_CMAKE_DIR} NO_DEFAULT_PATH) myx_message_notice("=== MyxCMake directory: ${MyxCMake_CONFIG} ===") else() if(MYX_CMAKE_USE_SYSTEM) - find_package(MyxCMake 2.0.24 REQUIRED) + find_package(MyxCMake 2.0.25 REQUIRED) myx_message_notice("=== MyxCMake directory: ${MyxCMake_CONFIG} ===") else() include(${PROJECT_SOURCE_DIR}/cmake/myx/MyxCMakeConfig.cmake)