diff --git a/MyxCMakeConfigVersion.cmake b/MyxCMakeConfigVersion.cmake index 69bd845..e7d32ef 100644 --- a/MyxCMakeConfigVersion.cmake +++ b/MyxCMakeConfigVersion.cmake @@ -1,4 +1,4 @@ -set(MYX_CMAKE_PACKAGE_VERSION "1.99.43") +set(MYX_CMAKE_PACKAGE_VERSION "1.99.44") if(MYX_CMAKE_PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) set(PACKAGE_VERSION_COMPATIBLE FALSE) else() diff --git a/README.md b/README.md index fdc39e9..3ead8d5 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ ```cmake if(MYX_CMAKE_USE_SYSTEM) - find_package(MyxCMake 1.99.43 REQUIRED) + find_package(MyxCMake 1.99.44 REQUIRED) else() include(${PROJECT_SOURCE_DIR}/cmake/myx/MyxCMakeConfig.cmake) endif() diff --git a/VERSION.txt b/VERSION.txt index 1fbd756..85a74f3 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -1.99.43 +1.99.44 diff --git a/lib/Qt5TargetSetup.cmake b/lib/Qt5TargetSetup.cmake index 0bc54d2..60358fa 100644 --- a/lib/Qt5TargetSetup.cmake +++ b/lib/Qt5TargetSetup.cmake @@ -56,9 +56,9 @@ function(myx_qt5_target_setup NAME) if("LinguistTools" IN_LIST ARG_COMPONENTS) foreach(iter ${ARG_LANGS}) qt5_create_translation(qm - "${PROJECT_SOURCE_DIR}/include" - "${PROJECT_SOURCE_DIR}/src" - "${PROJECT_SOURCE_DIR}/l10n/${NAME}_${iter}.ts") + "${PROJECT_SOURCE_DIR}/include" + "${PROJECT_SOURCE_DIR}/src" + "${PROJECT_SOURCE_DIR}/l10n/${NAME}_${iter}.ts") target_sources(${NAME} PRIVATE ${qm}) endforeach() unset(qm) @@ -67,9 +67,11 @@ function(myx_qt5_target_setup NAME) target_sources(${NAME} PRIVATE ${ARG_PUBLIC_MOC} ${ARG_PRIVATE_MOC} ${moc_cpp} ${ui_h} ${qrc_cpp}) # Установка публичных заголовочных файлов - install_relative(${PROJECT_SOURCE_DIR} - FILES ${ARG_PUBLIC_MOC} - DESTINATION ${CMAKE_INSTALL_PREFIX} - COMPONENT dev - ) + if(PROJECT_IS_TOP_LEVEL) + install_relative(${PROJECT_SOURCE_DIR} + FILES ${ARG_PUBLIC_MOC} + DESTINATION ${CMAKE_INSTALL_PREFIX} + COMPONENT dev + ) + endif() endfunction() diff --git a/lib/TargetSetup.cmake b/lib/TargetSetup.cmake index 8015868..8320209 100644 --- a/lib/TargetSetup.cmake +++ b/lib/TargetSetup.cmake @@ -76,9 +76,11 @@ function(myx_target_setup NAME) target_compile_definitions(${NAME} PRIVATE ${ARG_COMPILE_DEFINITIONS}) # Установка публичных заголовочных файлов - install_relative(${PROJECT_SOURCE_DIR} - FILES ${ARG_PUBLIC_HEADERS} - DESTINATION ${CMAKE_INSTALL_PREFIX} - COMPONENT dev - ) + if(PROJECT_IS_TOP_LEVEL) + install_relative(${PROJECT_SOURCE_DIR} + FILES ${ARG_PUBLIC_HEADERS} + DESTINATION ${CMAKE_INSTALL_PREFIX} + COMPONENT dev + ) + endif() endfunction()