Fix CMakeLists.txt 93/98593/1 accepted/tizen/3.0/common/20161123.140622 accepted/tizen/3.0/ivi/20161123.083225 accepted/tizen/3.0/mobile/20161123.083136 accepted/tizen/3.0/tv/20161123.083153 accepted/tizen/3.0/wearable/20161123.083209 accepted/tizen/common/20161125.095144 accepted/tizen/ivi/20161125.004143 accepted/tizen/mobile/20161125.003605 accepted/tizen/tv/20161125.003908 accepted/tizen/wearable/20161125.004030 submit/tizen/20161124.000829 submit/tizen_3.0/20161122.021326
authorJiwoong Im <jiwoong.im@samsung.com>
Fri, 18 Nov 2016 01:43:49 +0000 (10:43 +0900)
committerJiwoong Im <jiwoong.im@samsung.com>
Fri, 18 Nov 2016 01:43:49 +0000 (10:43 +0900)
To make extendible for adding source & header files.

Change-Id: Ibb73e9f65212fc384393cc4a1fee5a743e26946d
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
CMakeLists.txt

index 08cad00..e44e3be 100644 (file)
@@ -1,6 +1,7 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 
 PROJECT(eventsystem C)
+AUX_SOURCE_DIRECTORY(src/ SRCS)
 
 SET(VERSION 0.0.1)
 SET(VERSION_MAJOR 0)
@@ -35,9 +36,7 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
 
 ## build eventsystem library
-add_library(eventsystem SHARED
-               src/eventsystem.c
-               )
+add_library(eventsystem SHARED ${SRCS})
 
 #TARGET_LINK_LIBRARIES(eventsystem "-ldl")
 TARGET_LINK_LIBRARIES(eventsystem ${libpkgs_LDFLAGS})
@@ -50,5 +49,7 @@ configure_file(eventsystem.manifest.in eventsystem.manifest @ONLY)
 
 INSTALL(TARGETS eventsystem DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/eventsystem.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/eventsystem.h DESTINATION include)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/eventsystem_internal.h DESTINATION include)
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include/
+       FILES_MATCHING
+       PATTERN "*.h"
+       )