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}")
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/)
%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