Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 73 lines (71 sloc) 1.641 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
cmake_minimum_required(VERSION 2.8.5)
project(libdcpu-vm)

add_executable(embedfont embedfont.c)
include_directories(${libdcpu_SOURCE_DIR})
target_link_libraries(embedfont libdcpu)
if(MINGW)
    add_custom_command(
        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/font.c
        COMMAND ${CMAKE_CURRENT_BINARY_DIR}/embedfont${CMAKE_EXECUTABLE_SUFFIX} ${CMAKE_CURRENT_BINARY_DIR}/font.c ${CMAKE_CURRENT_SOURCE_DIR}/font.png
        DEPENDS font.png embedfont)
else()
     add_custom_command(
        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/font.c
        COMMAND embedfont ${CMAKE_CURRENT_BINARY_DIR}/font.c ${CMAKE_CURRENT_SOURCE_DIR}/font.png
        DEPENDS font.png embedfont)
endif()

find_package(OpenGL REQUIRED)
add_library(libdcpu-vm STATIC
    dcpu.c
    dcpubase.h
    dcpudis.h
    dcpuhook.h
    dcpuops.h
    glfwutils.h
    hw.h
    hwioascii.h
    hwkeyboard.h
    hwlem1802.h
    hwlem1802mem.h
    hwlem1802util.h
    hwlua.h
    hwluacpu.h
    hwm35fd.h
    hwsped3.h
    hwtimer.h
    timing.h
    dcpubase.c
    dcpudis.c
    dcpuhook.c
    dcpuops.c
    glfwutils.c
    hw.c
    hwioascii.c
    hwkeyboard.c
    hwlem1802.c
    hwlem1802mem.c
    hwlem1802util.c
    hwlua.c
    hwluacpu.c
    hwm35fd.c
    hwsped3.c
    hwtimer.c
    timing.c
    ${CMAKE_CURRENT_BINARY_DIR}/font.c
)
include_directories(
    ${png_SOURCE_DIR}
    ${png_BINARY_DIR}
    ${z_SOURCE_DIR}
    ${bstring_SOURCE_DIR}
    ${libdcpu_SOURCE_DIR}
    ${lua_SOURCE_DIR}
    ${simclist_SOURCE_DIR}
    ${libdcpu-pp-expr_SOURCE_DIR}
    ${GLFW_SOURCE_DIR}/include
    ${OPENGL_INCLUDE_DIR}
)
target_link_libraries(libdcpu-vm
    libdcpu
)
cotire(libdcpu-vm)
Something went wrong with that request. Please try again.