SFML/tools/opus/PatchOpusfile.cmake

5 lines
461 B
CMake
Raw Permalink Normal View History

2025-01-02 09:02:09 +08:00
file(READ "${OPUSFILE_DIR}/CMakeLists.txt" OPUSFILE_CMAKELISTS_CONTENTS)
string(REPLACE "\n\nadd_library(opusfile" "\nset(CMAKE_DEBUG_POSTFIX d)\nadd_library(opusfile" OPUSFILE_CMAKELISTS_CONTENTS "${OPUSFILE_CMAKELISTS_CONTENTS}")
string(REPLACE "PUBLIC_HEADER \"\${CMAKE_CURRENT_SOURCE_DIR}/include/opusfile.h\"" "" OPUSFILE_CMAKELISTS_CONTENTS "${OPUSFILE_CMAKELISTS_CONTENTS}")
file(WRITE "${OPUSFILE_DIR}/CMakeLists.txt" "${OPUSFILE_CMAKELISTS_CONTENTS}")