summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 9b7858c4bec63d431b6633bf87376bd350594e33 (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
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

SET(IVUG_PACKAGE_NAME "ug-image-viewer-efl")

# BUILD_TC can have TRUE or FALSE
SET(BUILD_TC FALSE)

IF("${ARCH}" STREQUAL "arm")
	ADD_DEFINITIONS("-DTARGET")
ENDIF("${ARCH}" STREQUAL "arm")

ADD_DEFINITIONS("-DDATADIR=\"${CMAKE_DATA_DIR}\"")
ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
ADD_DEFINITIONS("-DPACKAGE=\"${IVUG_PACKAGE_NAME}\"")

SET(IVUG_SOURCE_COMMON_DIR 		"${CMAKE_SOURCE_DIR}/common")
SET(IVUG_SOURCE_WIDGET_DIR 		"${CMAKE_SOURCE_DIR}/widget")
SET(IVUG_SOURCE_MAIN_DIR 		"${CMAKE_SOURCE_DIR}/main")
SET(IVUG_SOURCE_MEDIA_DIR 		"${CMAKE_SOURCE_DIR}/medialist")
SET(IVUG_SOURCE_SLIDESHOW_DIR 	"${CMAKE_SOURCE_DIR}/slideshow")
SET(IVUG_SOURCE_FEATURE_DIR 	"${CMAKE_SOURCE_DIR}/feature")

FUNCTION (BUILD_EDJ _in _out _base _dir)
	ADD_CUSTOM_TARGET(${_out}
			COMMAND
				edje_cc -id ${_base}/${_dir}
				${CMAKE_CURRENT_SOURCE_DIR}/${_base}/${_in}
				${CMAKE_CURRENT_SOURCE_DIR}/${_base}/${_out}
			DEPENDS
				${CMAKE_CURRENT_SOURCE_DIR}/${_base}/${_in}
	)
	ADD_DEPENDENCIES(${PROJECT_NAME} ${_out})
	INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${_base}/${_out} DESTINATION ${CMAKE_INSTALL_PREFIX}/res/edje/${IVUG_PACKAGE_NAME})
ENDFUNCTION (BUILD_EDJ)

INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/res/images/ DESTINATION ${CMAKE_INSTALL_PREFIX}/res/images/${IVUG_PACKAGE_NAME})

#CONFIGURE_FILE(${IVUG_PACKAGE_NAME}.desktop.in ${CMAKE_BINARY_DIR}/${IVUG_PACKAGE_NAME}.desktop)
#INSTALL(FILES ${CMAKE_BINARY_DIR}/${IVUG_PACKAGE_NAME}.desktop DESTINATION /opt/share/applications)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/res/manifest/${IVUG_PACKAGE_NAME}.xml DESTINATION /opt/share/packages)

ADD_SUBDIRECTORY(main)
ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(medialist)
ADD_SUBDIRECTORY(widget)
ADD_SUBDIRECTORY(slideshow)
ADD_SUBDIRECTORY(feature)

IF (BUILD_TC)
	ADD_SUBDIRECTORY(TC)
ENDIF()