diff --git a/CMakeLists.txt b/CMakeLists.txt index de4266a5..8e0cf741 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,26 +16,13 @@ # limitations under the License. cmake_minimum_required(VERSION 3.3) - -project(WPEFramework) - -set(VERSION_MAJOR 1) -set(VERSION_MINOR 0) -set(VERSION_PATCH 0) - -set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) -set(NAMESPACE ${PROJECT_NAME} CACHE STRING "Namespace of the project") - -message(STATUS "Setting up ${PROJECT_NAME} v${VERSION}") - -if (BUILD_REFERENCE) - add_definitions (-DBUILD_REFERENCE=${BUILD_REFERENCE}) -endif() +project(NanoServicesRDK) find_package(WPEFramework) -# Library installation location -string(TOLOWER ${NAMESPACE} STORAGE_DIRECTORY) +# All packages that did not deliver a CMake Find script (and some deprecated scripts that need to be removed) +# are located in the cmake directory. Include it in the search. +list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/") option(PLUGIN_DEVICEIDENTIFICATION "Include DeviceIdentification plugin" OFF) option(PLUGIN_DEVICEINFO "Include DeviceInfo plugin" OFF) @@ -48,6 +35,9 @@ option(PLUGIN_SECURITYAGENT "Include SecurityAgent plugin" OFF) option(PLUGIN_TRACECONTROL "Include TraceControl plugin" OFF) option(PLUGIN_WEBKITBROWSER "Include WebKitBrowser plugin" OFF) +# Library installation location +string(TOLOWER ${NAMESPACE} STORAGE_DIRECTORY) + if(PLUGIN_DEVICEIDENTIFICATION) add_subdirectory(DeviceIdentification) endif() @@ -87,3 +77,24 @@ endif() if(PLUGIN_WEBKITBROWSER) add_subdirectory(WebKitBrowser) endif() + +if(WPEFRAMEWORK_CREATE_IPKG_TARGETS) + set(CPACK_GENERATOR "DEB") + set(CPACK_DEB_COMPONENT_INSTALL ON) + set(CPACK_COMPONENTS_GROUPING IGNORE) + + set(CPACK_DEBIAN_PACKAGE_NAME "${WPEFRAMEWORK_PLUGINS_OPKG_NAME}") + set(CPACK_DEBIAN_PACKAGE_VERSION "${WPEFRAMEWORK_PLUGINS_OPKG_VERSION}") + set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${WPEFRAMEWORK_PLUGINS_OPKG_ARCHITECTURE}") + set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${WPEFRAMEWORK_PLUGINS_OPKG_MAINTAINER}") + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${WPEFRAMEWORK_PLUGINS_OPKG_DESCRIPTION}") + set(CPACK_PACKAGE_FILE_NAME "${WPEFRAMEWORK_PLUGINS_OPKG_FILE_NAME}") + + # list of components from which packages will be generated + set(CPACK_COMPONENTS_ALL + ${NAMESPACE}WebKitBrowser + WPEInjectedBundle + ) + + include(CPack) +endif() \ No newline at end of file