mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-08 15:45:14 +01:00
8fee8ed05d
- Move all tests from the top-level directory to tests/. - Move files shared by cefclient and unittests to tests/shared/. - Add a fused (single header/source file) version of gtest in tests/gtest/ with associated CMake configuration. - Test-only headers are now exposed in include/test/. Unit test targets must define UNIT_TEST in order to access them. - Replace usage of USING_CEF_SHARED with WRAPPING_CEF_SHARED for clarity (only the libcef_dll_wrapper target should define it). - Remove the RENAME_DIRECTORY CMake macro which is no longer used. - Remove C++11 usage from unittests sources for compatibility with the binary distribution configuration. - Windows: Fix build errors due to chrome_elf.dll and imm32.lib missing from the CMake configuration.
45 lines
1.5 KiB
CMake
45 lines
1.5 KiB
CMake
# Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
|
|
# reserved. Use of this source code is governed by a BSD-style license that
|
|
# can be found in the LICENSE file.
|
|
|
|
# Append platform specific sources to a list of sources.
|
|
macro(LIBCEF_APPEND_PLATFORM_SOURCES name_of_list)
|
|
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND ${name_of_list}_MACOSX)
|
|
list(APPEND ${name_of_list} ${${name_of_list}_MACOSX})
|
|
endif()
|
|
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND ${name_of_list}_LINUX)
|
|
list(APPEND ${name_of_list} ${${name_of_list}_LINUX})
|
|
endif()
|
|
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" AND ${name_of_list}_WINDOWS)
|
|
list(APPEND ${name_of_list} ${${name_of_list}_WINDOWS})
|
|
endif()
|
|
endmacro()
|
|
|
|
set(CEF_TARGET libcef_dll_wrapper)
|
|
|
|
{{
|
|
'prefix': 'libcef',
|
|
'library': '${CEF_TARGET}',
|
|
'append_macro': 'LIBCEF_APPEND_PLATFORM_SOURCES',
|
|
'includes': [
|
|
'includes_common',
|
|
'autogen_cpp_includes',
|
|
'includes_capi',
|
|
'autogen_capi_includes',
|
|
'includes_wrapper',
|
|
'includes_win:WINDOWS',
|
|
'includes_mac:MACOSX',
|
|
'includes_linux:LINUX',
|
|
'libcef_dll_wrapper_sources_base',
|
|
'libcef_dll_wrapper_sources_common',
|
|
'autogen_client_side',
|
|
],
|
|
}}
|
|
SET_LIBRARY_TARGET_PROPERTIES(${CEF_TARGET})
|
|
|
|
# Creating the CEF wrapper library. Do not define this for dependent targets.
|
|
target_compile_definitions(${CEF_TARGET} PRIVATE -DWRAPPING_CEF_SHARED)
|
|
|
|
# Remove the default "lib" prefix from the resulting library.
|
|
set_target_properties(${CEF_TARGET} PROPERTIES PREFIX "")
|