Skip to content

Commit

Permalink
[Cmake] fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MFransen69 committed Jan 23, 2021
1 parent 92ac3da commit a690181
Showing 1 changed file with 28 additions and 17 deletions.
45 changes: 28 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down Expand Up @@ -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()

0 comments on commit a690181

Please sign in to comment.