Make file & spec file generalization 15/98415/1 accepted/tizen/3.0/common/20161118.193002 accepted/tizen/3.0/ivi/20161118.004150 accepted/tizen/3.0/mobile/20161118.004020 accepted/tizen/3.0/tv/20161118.004107 accepted/tizen/3.0/wearable/20161118.004130 submit/tizen_3.0/20161117.054138
authorseungha.son <seungha.son@samsung.com>
Thu, 17 Nov 2016 07:43:19 +0000 (16:43 +0900)
committerseungha.son <seungha.son@samsung.com>
Thu, 17 Nov 2016 07:44:02 +0000 (16:44 +0900)
Signed-off-by: seungha.son <seungha.son@samsung.com>
Change-Id: Iedf4203922de47be7d0a9a3097688da51a1bf398

CMakeLists.txt
packaging/bundle.spec

index e72018f..939e00c 100644 (file)
@@ -22,13 +22,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fvisibility=hidden -flto")
 include_directories(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src)
 
 ### Build
-add_library(bundle SHARED
-               src/bundle.c
-               src/bundle_json.c
-               src/keyval_type.c
-               src/keyval.c
-               src/keyval_array.c
-               )
+aux_source_directory(src SRCS)
+add_library(bundle SHARED ${SRCS})
 set_target_properties(bundle PROPERTIES SOVERSION ${VERSION_MAJOR})
 set_target_properties(bundle PROPERTIES VERSION "${VERSION}")
 message(STATUS "Version from debian/changelog: ${VERSION},  Major version: ${VERSION_MAJOR}")
@@ -39,17 +34,7 @@ target_link_libraries(bundle ${pkgs_LDFLAGS})
 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/bundle.pc.in ${CMAKE_BINARY_DIR}/bundle.pc @ONLY)
 
-
 ### Install
-install(TARGETS bundle
-    DESTINATION ${LIB_INSTALL_DIR}
-       )
-install(FILES
-       ${CMAKE_SOURCE_DIR}/include/bundle.h
-       ${CMAKE_SOURCE_DIR}/include/bundle_internal.h
-       ${CMAKE_SOURCE_DIR}/include/SLP_bundle_PG.h
-       DESTINATION include/
-               )
-install(FILES ${CMAKE_BINARY_DIR}/bundle.pc
-    DESTINATION ${LIB_INSTALL_DIR}/pkgconfig/
-               )
+install(TARGETS bundle DESTINATION ${LIB_INSTALL_DIR})
+install(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ DESTINATION include/)
+install(FILES ${CMAKE_BINARY_DIR}/bundle.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig/)
index c2a4e69..90e1218 100644 (file)
@@ -48,8 +48,6 @@ cp %{SOURCE1001} .
 %files devel
 %manifest %{name}.manifest
 %defattr(-,root,root,-)
-%{_includedir}/bundle.h
-%{_includedir}/bundle_internal.h
-%{_includedir}/SLP_bundle_PG.h
+%{_includedir}/*.h
 %{_libdir}/pkgconfig/bundle.pc
 %{_libdir}/libbundle.so