Fix invalid licenses
[platform/framework/web/crosswalk-tizen.git] / tests / popup / CMakeLists.txt
1 #
2 # Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3 #
4 #    Licensed under the Apache License, Version 2.0 (the "License");
5 #    you may not use this file except in compliance with the License.
6 #    You may obtain a copy of the License at
7 #
8 #        http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #    Unless required by applicable law or agreed to in writing, software
11 #   distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #    See the License for the specific language governing permissions and
14 #    limitations under the License.
15 #
16
17 SET(TEST_POPUP_SRCDIR ${TEST_SRCDIR}/popup)
18 SET(BASE_SRCDIR ${PROJECT_SOURCE_DIR}/src)
19
20 # Package Dependencies
21 IF(X11_SUPPORT)
22   SET(WIN_PKG "ecore-x")
23 ENDIF(X11_SUPPORT)
24 IF(WAYLAND_SUPPORT)
25   SET(WIN_PKG "ecore-wayland")
26 ENDIF(WAYLAND_SUPPORT)
27
28 PKG_CHECK_MODULES(TARGET_TEST_POPUP_DEPS
29     dlog
30     ${WIN_PKG}
31     elementary
32     ecore
33     efl-assist
34    REQUIRED)
35
36 # Include Directories
37 SET(TARGET_TEST_POPUP_INCS
38   ${BASE_SRCDIR}
39   ${TEST_SRCDIR}
40   ${TARGET_TEST_POPUP_DEPS_INCLUDE_DIRS}
41 )
42
43 # Libraries
44 SET(TARGET_TEST_POPUP_LIBS
45   ${TARGET_COMMON_STATIC}
46   ${TARGET_TEST_POPUP_DEPS_LIBRARIES}
47 )
48
49 # Source Files
50 SET(TARGET_TEST_POPUP_SRCS
51   ${TEST_SRCDIR}/popup/popup.cc
52   ${TEST_SRCDIR}/popup/popup_string.cc
53   ${TEST_SRCDIR}/popup/test_popup.cc
54 )
55
56 # Compiler Flags
57 SET(TARGET_TEST_POPUP_CFLAGS
58   "-fPIE"
59 )
60
61 # Linker Flags
62 SET(TARGET_TEST_POPUP_LDFLAGS
63   "-pie"
64   "-ldl"
65 )
66
67 # Build Executable
68 SET(TARGET_TEST_POPUP "wrt-popup-test")
69 INCLUDE_DIRECTORIES(${TARGET_TEST_POPUP_INCS})
70 ADD_DEFINITIONS(${TARGET_TEST_POPUP_CFLAGS})
71 ADD_EXECUTABLE(${TARGET_TEST_POPUP} ${TARGET_TEST_POPUP_SRCS})
72 TARGET_LINK_LIBRARIES(${TARGET_TEST_POPUP}
73   ${TARGET_TEST_POPUP_LIBS}
74   ${TARGET_TEST_POPUP_LDFLAGS}
75 )
76
77 # Install
78 INSTALL(TARGETS ${TARGET_TEST_POPUP} DESTINATION bin)