cmake: fix nasm sources build when building in a separate directory
[flac.git] / src / libFLAC / ia32 / CMakeLists.txt
1 cmake_minimum_required(VERSION 3.9)
2
3 #include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
4 add_compile_options(-I${CMAKE_CURRENT_SOURCE_DIR}/)
5
6 if(APPLE)
7     add_compile_options(-dOBJ_FORMAT_macho)
8 elseif(WIN32)
9     #add_compile_options(-d OBJ_FORMAT_win32)
10     # FIXME the command above doesn't seem to work on Windows
11     set(CMAKE_ASM_NASM_FLAGS -dOBJ_FORMAT_win32)
12 else()
13     add_compile_options(-dOBJ_FORMAT_elf)
14 endif()
15
16 add_library(FLAC-asm OBJECT
17     cpu_asm.nasm
18     fixed_asm.nasm
19     lpc_asm.nasm)