~robru/ubuntu-purchase-service/didrocks-new

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
cmake_minimum_required (VERSION 2.8.9)

# This is the name and release version of the project
PROJECT (ubuntu-purchase-service)

# The QML mmodule information
set (QML_MODULE_NAME Ubuntu.Purchase)
set (QML_MODULE_PATH Ubuntu/Purchase)
set (QML_PLUGIN_NAME UbuntuPurchase)
set (QML_PLUGIN_API_VERSION 0.1)

# Install the qml file from here.
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/qml/${QML_PLUGIN_NAME}.qml
  DESTINATION lib/${PROJECT_NAME}
)

# Need to get libsignon/accounts here, as they get exposed in headers
find_package (PkgConfig REQUIRED)
pkg_check_modules(UBUNTUONE REQUIRED ubuntuoneauth-2.0)
add_definitions(${UBUNTUONE_CFLAGS} ${UBUNTUONE_CFLAGS_OTHER})

# Some default CFLAGS
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -g -Wall -Werror -fPIC")
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -O2 -g -Wall -Werror -fPIC")

# Allow specifying the libdir to use for the C library
SET (LIB_SUFFIX "" CACHE STRING "Define suffix of library directory name.")
SET (LIB_INSTALL_DIR "lib${LIB_SUFFIX}")

set (QML_MODULE_INSTALL_DIR ${LIB_INSTALL_DIR}/qt5/qml )

# We need to add these here which simply depend on other test rules, as
# CMake doesn't allow defining a "check" rule in multiple places.
# We use $namespace-tests[-valgrind[-leaks]] for the test names in subdirs,
# and depend on them here, so that 'make check' will run them all.
add_custom_target (check
  DEPENDS qmlunit-tests cppunit-tests
)

add_subdirectory (src)