-
Notifications
You must be signed in to change notification settings - Fork 14
/
CMakeLists.txt
34 lines (26 loc) · 1001 Bytes
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 2.8)
project(WPELauncher)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
find_package(WPEWebKit REQUIRED)
find_package(PkgConfig)
pkg_search_module(PC_GLIB REQUIRED glib-2.0)
set(GLIB_LIBRARIES )
foreach(lib ${PC_GLIB_LIBRARIES})
find_library(GLIB_LIBRARY
NAMES ${lib}
HINTS ${PC_GLIB_LIBDIR} ${PC_GLIB_LIBRARY_DIRS}
)
list(APPEND GLIB_LIBRARIES ${GLIB_LIBRARY})
endforeach()
set(GLIB_INCLUDE_DIRS ${PC_GLIB_INCLUDE_DIRS})
file(WRITE ${CMAKE_BINARY_DIR}/test_atomic.cpp
"#include <atomic>\n"
"int main() { std::atomic<int64_t> i(0); i++; return 0; }\n")
try_compile(ATOMIC_BUILD_SUCCEEDED ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}/test_atomic.cpp)
if (NOT ATOMIC_BUILD_SUCCEEDED)
list(APPEND WPE_WEBKIT_LIBRARIES atomic)
endif ()
file(REMOVE ${CMAKE_BINARY_DIR}/test_atomic.cpp)
add_subdirectory(injectedbundle)
add_subdirectory(launcher)