Browse Source

cmake: deduplicate install directives

tags/v1.8.0
Xiretza 3 years ago
parent
commit
63efb43444
No known key found for this signature in database GPG Key ID: 17B78226F7139993
1 changed files with 7 additions and 11 deletions
  1. +7
    -11
      CMakeLists.txt

+ 7
- 11
CMakeLists.txt View File

@@ -76,27 +76,23 @@ set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
IF(NOT WIN32) IF(NOT WIN32)
set(CPACK_GENERATOR "DEB;TGZ") set(CPACK_GENERATOR "DEB;TGZ")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.${CMAKE_SYSTEM_PROCESSOR}") set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.${CMAKE_SYSTEM_PROCESSOR}")

if (TARGET aptdec)
install(TARGETS aptdec)
install(DIRECTORY "${PROJECT_SOURCE_DIR}/palettes/" DESTINATION "palettes/")
endif()

install(TARGETS apt)
install(FILES ${LIB_C_HEADER_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/apt)
else() else()
#set(CPACK_GENERATOR "ZIP;NSIS") #set(CPACK_GENERATOR "ZIP;NSIS")
set(CPACK_GENERATOR "ZIP") set(CPACK_GENERATOR "ZIP")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")


if (TARGET aptdec) if (TARGET aptdec)
install(TARGETS aptdec)
file(GLOB_RECURSE DLLS *.dll) file(GLOB_RECURSE DLLS *.dll)
install(FILES ${DLLS} DESTINATION ${CMAKE_INSTALL_BINDIR}) install(FILES ${DLLS} DESTINATION ${CMAKE_INSTALL_BINDIR})
endif() endif()
install(TARGETS apt)
install(FILES ${LIB_C_HEADER_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/apt)
endif()

if (TARGET aptdec)
install(TARGETS aptdec)
install(DIRECTORY "${PROJECT_SOURCE_DIR}/palettes/" DESTINATION "palettes/") install(DIRECTORY "${PROJECT_SOURCE_DIR}/palettes/" DESTINATION "palettes/")
endif() endif()


install(TARGETS apt)
install(FILES ${LIB_C_HEADER_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/apt)

include(CPack) include(CPack)

Loading…
Cancel
Save