# Build appcore-watch Library
# ------------------------------
SET(APPCORE_WATCH "appcore-watch")
-SET(SRCS_watch
- src/appcore-watch.c
- src/appcore-watch-signal.c
- src/appcore-watch-i18n.c
- src/watch_app_main.c
- src/watch_app_error.c
- )
-SET(HEADERS_watch appcore-watch.h
- watch_app.h watch_app_efl.h)
INCLUDE(FindPkgConfig)
pkg_check_modules(pkg_watch REQUIRED
SET(EXTRA_CFLAGS_watch "${EXTRA_CFLAGS_watch} ${flag}")
ENDFOREACH(flag)
-ADD_LIBRARY(${APPCORE_WATCH} SHARED ${SRCS_watch})
+AUX_SOURCE_DIRECTORY(src SOURCES)
+ADD_LIBRARY(${APPCORE_WATCH} SHARED ${SOURCES})
SET_TARGET_PROPERTIES(${APPCORE_WATCH} PROPERTIES SOVERSION ${VERSION_MAJOR})
SET_TARGET_PROPERTIES(${APPCORE_WATCH} PROPERTIES VERSION ${VERSION})
SET_TARGET_PROPERTIES(${APPCORE_WATCH} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_watch})
INSTALL(TARGETS ${APPCORE_WATCH} DESTINATION lib COMPONENT RuntimeLibraries)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPCORE_WATCH}.pc DESTINATION lib/pkgconfig)
-FOREACH(hfile ${HEADERS_watch})
- INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/${hfile} DESTINATION include/appcore-watch)
-ENDFOREACH(hfile)
+
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include/appcore-watch/
+ FILES_MATCHING
+ PATTERN "*.h"
+ )