From: Hyunho Kang Date: Fri, 18 Nov 2016 01:43:43 +0000 (+0900) Subject: Fix CMakeLists.txt X-Git-Tag: accepted/tizen/3.0/common/20161123.140616^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e8809fe71f40df68041f64322e7a449563652c8;p=platform%2Fcore%2Fappfw%2Fappcore-watch.git Fix CMakeLists.txt To make extendible for adding source & header files. Change-Id: I31d2e14dd3b453a210f8af529131b7232cb88591 Signed-off-by: Hyunho Kang --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e216ee..15028d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,15 +22,6 @@ SET(CMAKE_SKIP_BUILD_RPATH TRUE) # 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 @@ -53,7 +44,8 @@ FOREACH(flag ${pkg_watch_CFLAGS}) 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}) @@ -63,6 +55,8 @@ CONFIGURE_FILE(${APPCORE_WATCH}.pc.in ${APPCORE_WATCH}.pc @ONLY) 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" + )