[libxmp-lite] Add INSTALL_HEADERS cmake macro

This commit is contained in:
Robert Schumacher 2017-10-02 13:53:59 -07:00
parent 49cd339fd3
commit 5f29b0aad7
2 changed files with 8 additions and 3 deletions

View File

@ -33,6 +33,11 @@ set(SOURCES src/virtual.c
include_directories(include/libxmp-lite src)
option(BUILD_SHARED_LIBS "Build shared libs" OFF)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
option(INSTALL_HEADERS "Install header files" OFF)
else()
option(INSTALL_HEADERS "Install header files" ON)
endif()
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
@ -55,4 +60,6 @@ install(
RUNTIME DESTINATION bin
)
install(FILES ${HEADERS} DESTINATION include)
if(INSTALL_HEADERS)
install(FILES ${HEADERS} DESTINATION include)
endif()

View File

@ -23,7 +23,5 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxmp-lite RENAME copyright)