This commit is contained in:
Andrei Astafev 2022-09-29 14:34:59 +03:00
parent 47c10bfbae
commit 9cf95c0859
5 changed files with 13 additions and 7 deletions

View File

@ -1,4 +1,4 @@
set(MYX_CMAKE_PACKAGE_VERSION "1.99.4")
set(MYX_CMAKE_PACKAGE_VERSION "1.99.5")
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.4 PATHS cmake/myx NO_DEFAULT_PATH QUIET REQUIRED)
find_package(MyxCMake 1.99.5 PATHS cmake/myx NO_DEFAULT_PATH QUIET REQUIRED)
```

View File

@ -1,8 +1,8 @@
include(GNUInstallDirs)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} PARENT_SCOPE)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} PARENT_SCOPE)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR} PARENT_SCOPE)
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} PARENT_SCOPE)
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} PARENT_SCOPE)
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR} PARENT_SCOPE)
#set(MYX_CMAKE_SCRIPTS_PREFIX ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} PARENT_SCOPE)

View File

@ -1,3 +1,9 @@
include_guard(GLOBAL)
if(${CMAKE_VERSION} VERSION_LESS "3.17.0")
set(CMAKE_CURRENT_FUNCTION_LIST_DIR "${CMAKE_CURRENT_LIST_DIR}")
endif()
include(CMakePackageConfigHelpers)
function(myx_install_library)
@ -8,7 +14,7 @@ function(myx_install_library)
)
configure_package_config_file(
${CMAKE_CURRENT_LIST_DIR}/InstallLibraryConfig.cmake.in
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/InstallLibraryConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
NO_SET_AND_CHECK_MACRO

View File

@ -14,4 +14,4 @@ function(myx_project_version_int)
# cmake-format: on
endfunction()
myx_project_version_int()
myx_is_semantic_project_version()