add_custom_target(exe ALL ${TOOLS_PREFIX}/bin/elf2exe ${PROJECT_NAME} ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.exe -mark="wnix, a Unix-like operating system for WebAssembly applications" DEPENDS ${PROJECT_NAME}) add_dependencies(exe tools) if(VIDEO_MODE STREQUAL "VMODE_PAL") set(region eur) elseif(VIDEO_MODE STREQUAL "VMODE_NTSC") set(ntsc_regions usa jap) if(NOT NTSC_REGION IN_LIST ntsc_regions) message(FATAL_ERROR "Please define valid NTSC_REGION. Available options:\n" "${ntsc_regions}\n" "Run CMake again using one of the available options above e.g.:\n" "cmake .. [options] -DNTSC_REGION=US") endif() set(region ${NTSC_REGION}) endif() add_custom_target(bin_cue ALL ${TOOLS_PREFIX}/bin/mkpsxiso -q ${CMAKE_BINARY_DIR}/wnix.xml WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) add_dependencies(bin_cue exe tools) set(cflags ${cflags}) if(CMAKE_BUILD_TYPE STREQUAL "Debug") set(cflags ${cflags} -Og) else() set(cflags ${cflags} -O3 -g) endif()