mirror of
https://github.com/konsoletyper/teavm.git
synced 2024-11-27 01:30:35 +08:00
Fix CMake configuration for GTK benchmark
This commit is contained in:
parent
c7e7e3b3f0
commit
b4460b2282
4
samples/benchmark/.gitignore
vendored
Normal file
4
samples/benchmark/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/CMakeFiles
|
||||
/CMakeCache.txt
|
||||
/Makefile
|
||||
/cmake_install.cmake
|
@ -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)
|
||||
target_link_libraries(teavm_benchmark ${GTK3_LIBRARIES} m)
|
Loading…
Reference in New Issue
Block a user