diff --git a/ports/libxmp-lite/CMakeLists.txt b/ports/libxmp-lite/CMakeLists.txt index 09323bf25c..9495e0eb4f 100644 --- a/ports/libxmp-lite/CMakeLists.txt +++ b/ports/libxmp-lite/CMakeLists.txt @@ -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() diff --git a/ports/libxmp-lite/portfile.cmake b/ports/libxmp-lite/portfile.cmake index 2d91f20b01..ac67940a1a 100644 --- a/ports/libxmp-lite/portfile.cmake +++ b/ports/libxmp-lite/portfile.cmake @@ -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)