summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
blob: f88ffbbccb32c0586215d880c4173ccf8f6ba3d9 (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
58
59
60
61
62
63
64
65
66
cmake_minimum_required(VERSION 3.0)
project (runxdg)

set(PROJECT_PRETTY_NAME "Run XDG Application")
set(PROJECT_MAJOR_VERSION "1.0")
set(PROJECT_MINOR_VERSION "1")
set(PROJECT_VERSION "${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}")

find_package(PkgConfig REQUIRED)
pkg_check_modules(GLIB REQUIRED glib-2.0)
pkg_check_modules(GIO REQUIRED gio-2.0)
pkg_check_modules(ILMCONTROL REQUIRED ilmControl)
pkg_check_modules(ILMINPUT REQUIRED ilmInput)

# No configuration
# configure_file (
#   "${PROJECT_SOURCE_DIR}/config.h.in"
#   "${PROJECT_BINARY_DIR}/config.h"
# )
#
# include_directories("${PROJECT_BINARY_DIR}")

include_directories(
  "include"
  "${ILMCONTROL_INCLUDE_DIRS}"
  "${ILMINPUT_INCLUDE_DIRS}"
  "${GLIB_INCLUDE_DIRS}"
  "${GIO_INCLUDE_DIRS}"
  )

SET(SRC_FILES
    src/runxdg.cpp
)

SET(LIBRARIES
  windowmanager
  homescreen
  ${ILMCONTROL_LIBRARIES}
  ${ILMINPUT_LIBRARIES}
  afbwsc
  json-c
  pthread
  ${GLIB_LIBRARIES}
  ${GIO_LIBRARIES}
  )

add_executable (runxdg ${SRC_FILES})

TARGET_LINK_LIBRARIES (runxdg ${LIBRARIES})

install (TARGETS runxdg DESTINATION bin)

add_custom_command(TARGET runxdg POST_BUILD
  COMMAND cp -rf ${CMAKE_CURRENT_SOURCE_DIR}/package ${PROJECT_BINARY_DIR})

add_custom_target(widget
  # simple egl
  COMMAND wgtpkg-pack -f -o ${PROJECT_BINARY_DIR}/package/simple-egl.wgt ${PROJECT_BINARY_DIR}/package/simple-egl
  # override hvac to test runxdg

  # test for webbrowser
  COMMAND wgtpkg-pack -f -o ${PROJECT_BINARY_DIR}/package/webbrowser.wgt ${PROJECT_BINARY_DIR}/package/webbrowser

  # test for lifecycle
  COMMAND wgtpkg-pack -f -o ${PROJECT_BINARY_DIR}/package/lifecycle.wgt ${PROJECT_BINARY_DIR}/package/lifecycle
)