aboutsummaryrefslogtreecommitdiff
path: root/cmake/win9x.cmake
blob: c66ed5e26063f891e0911c08cb8da91aad2febfe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
add_custom_command(OUTPUT ${cdroot}/${PROJECT_NAME}.exe
        COMMAND i386-mingw32-strip ${PROJECT_NAME}${CMAKE_EXECUTABLE_SUFFIX}
            -o ${cdroot}/${PROJECT_NAME}.exe
        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
        DEPENDS ${PROJECT_NAME}
        VERBATIM)
add_custom_target(stripped-exe ALL DEPENDS ${cdroot}/${PROJECT_NAME}.exe)

target_link_libraries(SDL::SDL INTERFACE gdi32 user32 winmm dxguid)
target_link_libraries(ENET INTERFACE wsock32)

add_compile_options(-march=i386)

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    # i386-mingw32-gcc 3.4.5 does not support -Og.
    set(cflags ${cflags} -O0)
else()
    set(cflags ${cflags} -Os)
endif()

include("${CMAKE_CURRENT_LIST_DIR}/fetch-libfixmath.cmake")
add_subdirectory(libfixmath)