You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
831 B
49 lines
831 B
project(mir)
|
|
|
|
enable_language(C)
|
|
|
|
message(STATUS "OS type is ${CMAKE_SYSTEM_NAME}")
|
|
message(STATUS "System processor is ${CMAKE_HOST_SYSTEM_PROCESSOR}")
|
|
message(STATUS "Build type is ${CMAKE_BUILD_TYPE}")
|
|
|
|
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
|
|
set(TARGET x86_64)
|
|
else()
|
|
message(FATAL "Unsupported platform")
|
|
endif()
|
|
|
|
set(MIR_HEADERS
|
|
mir.h
|
|
mir-gen.h
|
|
mir-varr.h
|
|
mir-dlist.h
|
|
mir-htab.h
|
|
mir-hash.h
|
|
mir-bitmap.h
|
|
)
|
|
|
|
set(MIR_SRCS
|
|
mir.c
|
|
mir-gen.c
|
|
)
|
|
|
|
set(C2MIR_SRCS
|
|
c2mir/c2mir.c
|
|
)
|
|
|
|
set(LIBS dl)
|
|
|
|
add_definitions(-D${TARGET})
|
|
add_definitions(-DMIR_IO)
|
|
add_definitions(-DMIR_SCAN)
|
|
|
|
include_directories(".")
|
|
include_directories("./c2mir")
|
|
|
|
add_library(c2mir
|
|
${MIR_HEADERS}
|
|
${MIR_SRCS}
|
|
${C2MIR_SRCS})
|
|
target_link_libraries(c2mir ${LIBS})
|
|
|