summaryrefslogtreecommitdiff
path: root/src/lib/items/CMakeLists.txt
blob: 6f500fe9f7640545dcaca181411a9271c8ae8f77 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
set(THEME_INSTALL_PATH "${CMAKE_SOURCE_DIR}/data/")

set(THEME_PATH_DEFINITION THEME_PATH="${THEME_INSTALL_PATH}")

LIST(APPEND ELM_ITEMS_LIBRARY
   elm_items.c
   elm_items_display.c
   elm_items_display.eo.x
   elm_items_display.eo.h
   elm_items_item.c
   elm_items_item.eo.x
   elm_items_item.eo.h
   elm_items_list.c
   elm_items_list.eo.x
   elm_items_list.eo.h
   elm_items_list_pan.eo.x
   elm_items_list_pan.eo.h
   elm_items_pan.eo.x
   elm_items_pan.eo.h
   )

string(REPLACE "\n" "" EOLIAN_EO_DIR_WITHOUT_NEWLINE
"${EOLIAN_EO_DIR}")

file(GLOB_RECURSE files "*.eo")

foreach(filename ${files})
add_custom_command(
   OUTPUT ${filename}.x
   COMMAND eolian_gen -I ${EOLIAN_EO_DIR_WITHOUT_NEWLINE} -I ${CMAKE_SOURCE_DIR}/src/lib/ -I ${CMAKE_SOURCE_DIR}/src/tree/ --gc --eo --eo -o ${filename}.x ${filename}
   DEPENDS ${filename}
)

add_custom_command(
   OUTPUT ${filename}.h
   COMMAND eolian_gen -I ${EOLIAN_EO_DIR_WITHOUT_NEWLINE} -I ${CMAKE_SOURCE_DIR}/src/lib/ -I ${CMAKE_SOURCE_DIR}/src/tree/ --gh --eo -o ${filename}.h ${filename}
   DEPENDS ${filename}
)

endforeach()

add_library(elm_items SHARED ${ELM_ITEMS_LIBRARY})

include_directories(
  ${EINA_INCLUDE_DIRS}
  ${EO_INCLUDE_DIRS}
  ${ELEMENTARY_INCLUDE_DIRS}
  ../tree
)

target_link_libraries(elm_items
  ${ELEMENTARY_LIRBRARIES}
  tree_lib
)

set_property(TARGET elm_items
   PROPERTY COMPILE_DEFINITIONS ${THEME_PATH_DEFINITION})