tizen beta release
[framework/web/wrt-installer.git] / tests / config_generator / CMakeLists.txt
1 # Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
2 #
3 #    Licensed under the Apache License, Version 2.0 (the "License");
4 #    you may not use this file except in compliance with the License.
5 #    You may obtain a copy of the License at
6 #
7 #        http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #    Unless required by applicable law or agreed to in writing, software
10 #    distributed under the License is distributed on an "AS IS" BASIS,
11 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #    See the License for the specific language governing permissions and
13 #    limitations under the License.
14 #
15 # @file        CMakeLists.txt
16 # @author      Krzysztof Jackiewicz (k.jackiewicz@samsung.com)
17 # @version     1.0
18 # @brief
19 #
20
21 # TODO create and use common test build framework as in wrt.
22
23 PKG_CHECK_MODULES(TEST_DEPS
24     dpl-efl
25     dpl-test-efl
26     libxml-2.0
27     REQUIRED
28     )
29
30 #target
31 SET(TARGET_CONFIG_GEN_TEST "wrt-tests-config-gen")
32
33 #sources
34 FILE(GLOB CONFIG_GEN_TEST_SOURCES
35     ${PROJECT_SOURCE_DIR}/tests/config_generator/*.cpp
36     )
37
38 # includes
39 INCLUDE_DIRECTORIES(
40     ${PROJECT_SOURCE_DIR}/src/config_generator/
41     ${TEST_DEPS_INCLUDE_DIRS}
42 )
43
44 # executable
45 ADD_EXECUTABLE(${TARGET_CONFIG_GEN_TEST} ${CONFIG_GEN_TEST_SOURCES})
46
47 #libraries
48 TARGET_LINK_LIBRARIES(${TARGET_CONFIG_GEN_TEST}
49     ${TARGET_CONFIG_GEN_LIB}
50     ${TEST_DEPS_LIBRARIES}
51     )
52
53 # xml files
54 FILE(GLOB CONFIG_GEN_XML_FILES
55     ${PROJECT_SOURCE_DIR}/tests/config_generator/xml/*.xml
56     )
57
58 INSTALL(FILES ${CONFIG_GEN_XML_FILES} DESTINATION /opt/apps/config_gen)
59
60 # install
61 SET_TARGET_PROPERTIES(${TARGET_CONFIG_GEN_TEST} PROPERTIES
62     BUILD_WITH_INSTALL_RPATH ON
63     INSTALL_RPATH_USE_LINK_PATH ON
64 )
65
66 INSTALL(TARGETS ${TARGET_CONFIG_GEN_TEST}
67     DESTINATION bin
68     PERMISSIONS OWNER_READ
69                 OWNER_WRITE
70                 OWNER_EXECUTE
71                 GROUP_READ
72                 GROUP_EXECUTE
73                 WORLD_READ
74                 WORLD_EXECUTE
75 )