From 2a29e33794df89b2ccf8548c3357fda7689869a2 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Thu, 29 Sep 2022 15:42:22 +0300 Subject: [PATCH] 1.99.7 --- MyxCMakeConfigVersion.cmake | 2 +- README.md | 2 +- lib/AddLibrary.cmake | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/MyxCMakeConfigVersion.cmake b/MyxCMakeConfigVersion.cmake index 325bb9d..3e1f32b 100644 --- a/MyxCMakeConfigVersion.cmake +++ b/MyxCMakeConfigVersion.cmake @@ -1,4 +1,4 @@ -set(MYX_CMAKE_PACKAGE_VERSION "1.99.6") +set(MYX_CMAKE_PACKAGE_VERSION "1.99.7") 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 9fc1e47..bbfb609 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,6 @@ `project` добавить строку: ```cmake -find_package(MyxCMake 1.99.6 PATHS cmake/myx NO_DEFAULT_PATH QUIET REQUIRED) +find_package(MyxCMake 1.99.7 PATHS cmake/myx NO_DEFAULT_PATH QUIET REQUIRED) ``` diff --git a/lib/AddLibrary.cmake b/lib/AddLibrary.cmake index baeea52..edcdc05 100644 --- a/lib/AddLibrary.cmake +++ b/lib/AddLibrary.cmake @@ -12,12 +12,6 @@ function(myx_add_library) set(arg_TYPE "OBJECT") endif() - string(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER) - # Опция для разрешения сборки разделяемой библиотеки - option(${PROJECT_NAME_UPPER}_BUILD_SHARED "Build shared library" ON) - # Опция для разрешения сборки статической библиотеки - option(${PROJECT_NAME_UPPER}_BUILD_STATIC "Build static library" ON) - add_library(${PROJECT_NAME} ${arg_TYPE}) if(arg_TYPE STREQUAL INTERFACE) @@ -27,6 +21,12 @@ function(myx_add_library) $ ) else() + string(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER) + # Опция для разрешения сборки разделяемой библиотеки + option(${PROJECT_NAME_UPPER}_BUILD_SHARED "Build shared library" ON) + # Опция для разрешения сборки статической библиотеки + option(${PROJECT_NAME_UPPER}_BUILD_STATIC "Build static library" ON) + target_include_directories(${PROJECT_NAME} PUBLIC $ @@ -44,7 +44,7 @@ function(myx_add_library) NO_DEPRECATED_MACRO_NAME "NO_DEPRECATED_${suffix}" NO_EXPORT_MACRO_NAME "NO_EXPORT_${suffix}" STATIC_DEFINE "STATIC_DEFINE_${suffix}" - EXPORT_FILE_NAME "${PROJECT_SOURCE_DIR}/include/${PROJECT_NAME}/export.hpp" + EXPORT_FILE_NAME "${PROJECT_SOURCE_DIR}/include/${PROJECT_NAME}/export_autogen.hpp" DEFINE_NO_DEPRECATED )