summaryrefslogtreecommitdiff
path: root/eo/smartobj/CMakeLists.txt
blob: 0d9db0416d908d991a6cafe1641e49c8481ad761 (plain)
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
cmake_minimum_required(VERSION 2.8)

project(EoSample)
find_program(EOLIAN eolian_gen)
if (NOT EOLIAN)
   message(FATAL_ERROR "eolian_gen not found")
endif()
set(EOLIAN_GEN_INCLUDE
   -I /usr/local/share/eolian/include/eo-1 -I/usr/local/share/eolian/include/efl-1
   -I/usr/local/share/eolian/include/evas-1 -I/usr/local/share/eolian/include/edje-1
   -I/usr/local/share/eolian/include/ecore-1 -I/usr/local/share/eolian/include/elementary-1
   -I /usr/local/share/eolian/include/evas-1)

find_package(PkgConfig REQUIRED)
pkg_check_modules(ELEMENTARY REQUIRED elementary)
include_directories(${ELEMENTARY_INCLUDE_DIRS})

add_custom_command(OUTPUT rect_smart.eo.c
   COMMAND eolian_gen ${EOLIAN_GEN_INCLUDE} -gc  rect_smart.eo)
add_custom_command(OUTPUT rect_smart.eo.h
   COMMAND eolian_gen ${EOLIAN_GEN_INCLUDE} -gh  rect_smart.eo)
add_custom_command(OUTPUT rect_smart.c
   COMMAND eolian_gen ${EOLIAN_GEN_INCLUDE} -gi -o rect_smart rect_smart.eo)

add_custom_target(eo_file ALL
   DEPENDS rect_smart.eo.c rect_smart.eo.h rect_smart.c)
add_executable(rect_smart
   rect_smart.c
   main.c)
target_link_libraries(rect_smart ${ELEMENTARY_LIBRARIES})