summaryrefslogtreecommitdiff
path: root/server/CMakeLists.txt
blob: e0fbb0605e1f1f634acc0fb303ed6670f3b7798d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
SET(THUMB-SERVER
        ../src/util/media-thumb-db.c
	    ../src/media-thumb-internal.c
	    thumb-server.c
	    thumb-server-internal.c)

INCLUDE(FindPkgConfig)
	pkg_check_modules(pkgs REQUIRED glib-2.0 gthread-2.0 dlog mm-fileinfo aul libmedia-utils libtzplatform-config)

FOREACH(flag ${pkgs_CFLAGS})
	SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--hash-style=both -pie")

ADD_EXECUTABLE(media-thumbnail-server ${THUMB-SERVER})
TARGET_LINK_LIBRARIES(media-thumbnail-server ${pkgs_LDFLAGS} ${MEDIATHUMB-LIB} )
INSTALL(TARGETS media-thumbnail-server DESTINATION ${BINDIR})