2018-05-16 15:14:37 -07:00
|
|
|
cmake_minimum_required(VERSION 3.9)
|
2018-11-20 04:22:19 -08:00
|
|
|
project(teavm_benchmark C)
|
2018-05-16 15:14:37 -07:00
|
|
|
|
|
|
|
set(CMAKE_C_STANDARD 11)
|
2018-11-20 04:22:19 -08:00
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/target/)
|
2018-05-16 15:14:37 -07:00
|
|
|
|
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g")
|
|
|
|
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
|
|
|
|
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
|
|
|
|
|
2018-11-20 04:22:19 -08:00
|
|
|
file(COPY support.c DESTINATION target/generated/c)
|
2018-05-16 15:14:37 -07:00
|
|
|
include_directories(${GTK3_INCLUDE_DIRS})
|
|
|
|
link_directories(${GTK3_LIBRARY_DIRS})
|
|
|
|
add_definitions(${GTK3_CFLAGS_OTHER})
|
2018-11-20 04:22:19 -08:00
|
|
|
add_executable(teavm_benchmark target/generated/c/classes.c)
|
2018-05-16 15:14:37 -07:00
|
|
|
|
2018-11-20 04:22:19 -08:00
|
|
|
target_link_libraries(teavm_benchmark ${GTK3_LIBRARIES} m)
|