1.99.7
This commit is contained in:
parent
1728ffb56d
commit
2a29e33794
@ -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)
|
if(MYX_CMAKE_PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||||
else()
|
else()
|
||||||
|
@ -11,6 +11,6 @@
|
|||||||
`project` добавить строку:
|
`project` добавить строку:
|
||||||
|
|
||||||
```cmake
|
```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)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -12,12 +12,6 @@ function(myx_add_library)
|
|||||||
set(arg_TYPE "OBJECT")
|
set(arg_TYPE "OBJECT")
|
||||||
endif()
|
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})
|
add_library(${PROJECT_NAME} ${arg_TYPE})
|
||||||
|
|
||||||
if(arg_TYPE STREQUAL INTERFACE)
|
if(arg_TYPE STREQUAL INTERFACE)
|
||||||
@ -27,6 +21,12 @@ function(myx_add_library)
|
|||||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||||
)
|
)
|
||||||
else()
|
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}
|
target_include_directories(${PROJECT_NAME}
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||||
@ -44,7 +44,7 @@ function(myx_add_library)
|
|||||||
NO_DEPRECATED_MACRO_NAME "NO_DEPRECATED_${suffix}"
|
NO_DEPRECATED_MACRO_NAME "NO_DEPRECATED_${suffix}"
|
||||||
NO_EXPORT_MACRO_NAME "NO_EXPORT_${suffix}"
|
NO_EXPORT_MACRO_NAME "NO_EXPORT_${suffix}"
|
||||||
STATIC_DEFINE "STATIC_DEFINE_${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
|
DEFINE_NO_DEPRECATED
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user