From f3e520b2d7d0c55c09492409472bdf7afe2a981a Mon Sep 17 00:00:00 2001 From: codicodi Date: Thu, 27 Apr 2017 14:17:29 +0200 Subject: [PATCH] [libflac] fix build with MSBuild generator --- ports/libflac/CMakeLists.txt | 13 +++++++------ ports/libflac/CONTROL | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ports/libflac/CMakeLists.txt b/ports/libflac/CMakeLists.txt index c228025f90..518419c4fa 100644 --- a/ports/libflac/CMakeLists.txt +++ b/ports/libflac/CMakeLists.txt @@ -25,12 +25,13 @@ endif() if(LIBFLAC_ARCHITECTURE MATCHES x86) add_definitions(-DFLAC__CPU_IA32) add_definitions(-DFLAC__HAS_NASM) - enable_language(ASM_NASM) - list(APPEND LIBFLAC_SOURCES - src/libFLAC/ia32/cpu_asm.nasm - src/libFLAC/ia32/fixed_asm.nasm - src/libFLAC/ia32/lpc_asm.nasm) - set(CMAKE_ASM_NASM_FLAGS "-i\"${PROJECT_SOURCE_DIR}/src/libFLAC/ia32/\" -f win32 -d OBJ_FORMAT_win32") + file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/nasm) + foreach(ASM_SOURCE cpu_asm fixed_asm lpc_asm) + execute_process(COMMAND nasm "-i${PROJECT_SOURCE_DIR}/src/libFLAC/ia32/" -f win32 -d OBJ_FORMAT_win32 -f win32 + -o "${CMAKE_BINARY_DIR}/nasm/${ASM_SOURCE}.obj" "${PROJECT_SOURCE_DIR}/src/libFLAC/ia32/${ASM_SOURCE}.nasm" + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) + list(APPEND LIBFLAC_SOURCES ${CMAKE_BINARY_DIR}/nasm/${ASM_SOURCE}.obj) + endforeach() elseif(LIBFLAC_ARCHITECTURE MATCHES x64) add_definitions(-DFLAC__CPU_X86_64) add_definitions(-DENABLE_64_BIT_WORDS) diff --git a/ports/libflac/CONTROL b/ports/libflac/CONTROL index 52878673de..b81ec3cd14 100644 --- a/ports/libflac/CONTROL +++ b/ports/libflac/CONTROL @@ -1,4 +1,4 @@ Source: libflac -Version: 1.3.2-1 +Version: 1.3.2-2 Description: Library for manipulating FLAC files Build-Depends: libogg