how can I conditionaly include differnt assembly .asm files based on a define example if linux os include linux.asm else include windows.asm
I have an app that uses multiple static libraries that use NASM as the assembler and compiles in Linux and android and all builds are done with CMake only. They all compile fine and I did conditional includes of assembly files using the NASM -P option. For example in CMAKE
if(DEFINED TARGET_OS_ANDROID)
#android/aarch64 uses clang as assembler
elseif(DEFINED TARGET_OS_WINDOWS)
enable_language(ASM_NASM)
string(APPEND CMAKE_ASM_NASM_FLAGS “-Pconfig_ffmpeg_w64.asm “)
else()
enable_language(ASM_NASM)
string(APPEND CMAKE_ASM_NASM_FLAGS “-Pconfig_ffmpeg_linux.asm “)
endif()
I want to compile using flatpak for Linux distribution but the -P no longer works (I assume flatpak overrides it for their own use).
Is there a way to conditionally include asm files like above but inside a asm file using a if defined to simulate what I did in CMAKE?
Using scripts to generate the asm file before the compile is NOT an option
repo checkout is git clone https://gitlab.com/nolimitconnectapps/nolimitapp.git