Обновление для совместимости с новой версией myx-cmake

This commit is contained in:
Andrei Astafev 2021-12-24 14:30:39 +03:00
parent 6c1728bce0
commit 6f2d2361fd
3 changed files with 2 additions and 9 deletions

View File

@ -19,7 +19,7 @@ if(NOT DEFINED MYXLIB_MASTER_PROJECT)
endif()
endif()
find_package(MyxCMake 0.3.0 REQUIRED)
find_package(MyxCMake 0.4.1 REQUIRED)
#cmlib_set_cxx_standard(11)
option(MYXLIB_BUILD_EXAMPLES "Build examples" OFF)

View File

@ -11,6 +11,7 @@ set(TRGT_hpp ${CMAKE_CURRENT_SOURCE_DIR}/paths.hpp)
set(TRGT_headers ${TRGT_hpp})
# cmake-format: on
#add_library(${TRGT} ${TRGT_cpp} ${TRGT_headers})
add_library(${TRGT} OBJECT ${TRGT_cpp} ${TRGT_headers})
set_target_properties(${TRGT} PROPERTIES OUTPUT_NAME myx-${TRGT})
myx_cmake_common_target_properties(${TRGT})
@ -22,7 +23,3 @@ target_include_directories(${TRGT} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS})
myx_cmake_generate_pkgconfig(${TRGT} BASENAME myx-${TRGT} INSTALL_LIBRARY ${MYXLIB_BUILD_LIBRARIES})
install(FILES ${TRGT_headers} COMPONENT dev
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${TRGT})
# Цель, используемая только для установки заголовочных файлов без компиляции проекта
add_custom_target(${TRGT}-install-headers COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=dev -P
"${CMAKE_BINARY_DIR}/cmake_install.cmake")

View File

@ -43,7 +43,3 @@ target_include_directories(${TRGT} SYSTEM PUBLIC ${Qt5Core_INCLUDE_DIRS})
myx_cmake_generate_pkgconfig(${TRGT} BASENAME myx-${TRGT} INSTALL_LIBRARY ${MYXLIB_BUILD_LIBRARIES})
install(FILES ${TRGT_headers} COMPONENT dev
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${TRGT})
# Цель, используемая только для установки заголовочных файлов без компиляции проекта
add_custom_target(${TRGT}-install-headers COMMAND "${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=dev -P
"${CMAKE_BINARY_DIR}/cmake_install.cmake")