This commit is contained in:
Andrei Astafev 2022-09-29 15:42:22 +03:00
parent 1728ffb56d
commit 2a29e33794
3 changed files with 9 additions and 9 deletions

View File

@ -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()

View File

@ -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)
```

View File

@ -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)
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
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
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
@ -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
)