# =========== libcopp/src - fcontext : ${LIBCOPP_FCONTEXT_OS_PLATFORM} - sysv - ${LIBCOPP_FCONTEXT_BIN_FORMAT} - ${LIBCOPP_FCONTEXT_AS_T
file(MAKE_DIRECTORY "${PROJECT_LIBCOPP_FCONTEXT_BIN_DIR}")

if(MSVC)
  list(APPEND COPP_SRC_LIST "${PROJECT_LIBCOPP_FCONTEXT_ASM_DIR}/${PROJECT_LIBCOPP_FCONTEXT_SRC_NAME_MAKE}.asm"
       "${PROJECT_LIBCOPP_FCONTEXT_ASM_DIR}/${PROJECT_LIBCOPP_FCONTEXT_SRC_NAME_JUMP}.asm"
       "${PROJECT_LIBCOPP_FCONTEXT_ASM_DIR}/${PROJECT_LIBCOPP_FCONTEXT_SRC_NAME_ONTOP}.asm")
  set(MASMFound FALSE)
  enable_language(ASM_MASM)
  if(CMAKE_ASM_MASM_COMPILER_WORKS)
    set(MASMFound TRUE)
  else()
    echowithcolor(COLOR RED "-- enable masm failed")
    message(FATAL_ERROR "enable ASM_MASM failed")
  endif(CMAKE_ASM_MASM_COMPILER_WORKS)
else()
  list(APPEND COPP_SRC_LIST "${PROJECT_LIBCOPP_FCONTEXT_ASM_DIR}/${PROJECT_LIBCOPP_FCONTEXT_SRC_NAME_MAKE}.asm"
       "${PROJECT_LIBCOPP_FCONTEXT_ASM_DIR}/${PROJECT_LIBCOPP_FCONTEXT_SRC_NAME_JUMP}.asm"
       "${PROJECT_LIBCOPP_FCONTEXT_ASM_DIR}/${PROJECT_LIBCOPP_FCONTEXT_SRC_NAME_ONTOP}.asm")
endif()
