From b4460b228268bdc69106ff1005fdfb15d704e837 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Tue, 20 Nov 2018 15:22:19 +0300 Subject: [PATCH] Fix CMake configuration for GTK benchmark --- samples/benchmark/.gitignore | 4 ++++ samples/benchmark/CMakeLists.txt | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 samples/benchmark/.gitignore diff --git a/samples/benchmark/.gitignore b/samples/benchmark/.gitignore new file mode 100644 index 000000000..aa057d63a --- /dev/null +++ b/samples/benchmark/.gitignore @@ -0,0 +1,4 @@ +/CMakeFiles +/CMakeCache.txt +/Makefile +/cmake_install.cmake \ No newline at end of file diff --git a/samples/benchmark/CMakeLists.txt b/samples/benchmark/CMakeLists.txt index 9a4071db5..9e18ce699 100644 --- a/samples/benchmark/CMakeLists.txt +++ b/samples/benchmark/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.9) -project(teavm_c_example C) +project(teavm_benchmark C) set(CMAKE_C_STANDARD 11) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/target/) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) @@ -13,9 +14,10 @@ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3") find_package(PkgConfig REQUIRED) pkg_check_modules(GTK3 REQUIRED gtk+-3.0) +file(COPY support.c DESTINATION target/generated/c) include_directories(${GTK3_INCLUDE_DIRS}) link_directories(${GTK3_LIBRARY_DIRS}) add_definitions(${GTK3_CFLAGS_OTHER}) -add_executable(teavm_c_example classes.c) +add_executable(teavm_benchmark target/generated/c/classes.c) -target_link_libraries(teavm_c_example ${GTK3_LIBRARIES} m) \ No newline at end of file +target_link_libraries(teavm_benchmark ${GTK3_LIBRARIES} m) \ No newline at end of file