CMake Error at cmake/cef_macros.cmake:263 (add_library)

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CMake Error at cmake/cef_macros.cmake:263 (add_library)

Postby lexes » Sat Nov 03, 2018 7:13 am

Good day. I am just starting to learn how to work with CEF. I'm trying to compile Standard distribution (http://opensource.spotify.com/cefbuilds ... 64.tar.bz2), but I get an error. I make the build in Windows 8.1 64. The compiler uses the mingw installed with the of cygwin.

The steps that I do to build:
1. Download and unzipp the file
2. Export
Code: Select all
export $CC=x86_64-w64-mingw32-gcc
export $CXX=86_64-w64-mingw32-g++

3. Next
Code: Select all
lexes@i3 ~/cef_binary_3.3538.1849.g458cc98_windows64
$ mkdir build

lexes@i3 ~/cef_binary_3.3538.1849.g458cc98_windows64
$ cd build/

lexes@i3 ~/cef_binary_3.3538.1849.g458cc98_windows64/build
$ cmake .. -DCMAKE_BUILD_TYPE=Debug

next i get an error
Code: Select all
CMake Error at cmake/cef_macros.cmake:263 (add_library):
  add_library called with IMPORTED argument but no library type.
Call Stack (most recent call first):
  tests/ceftests/CMakeLists.txt:307 (ADD_LOGICAL_TARGET)


All log:
Code: Select all
lexes@i3 ~/cef_binary_3.3538.1849.g458cc98_windows64/build
$ cmake .. -DCMAKE_BUILD_TYPE=Debug
-- The C compiler identification is GNU 6.4.0
-- The CXX compiler identification is GNU 6.4.0
-- Check for working C compiler: /usr/bin/x86_64-w64-mingw32-gcc.exe
-- Check for working C compiler: /usr/bin/x86_64-w64-mingw32-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++.exe
-- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at cmake/cef_variables.cmake:16 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "CYGWIN" will no longer be dereferenced when the
  policy is set to NEW.  Since the policy is not set the OLD behavior will be
  used.
Call Stack (most recent call first):
  cmake/FindCEF.cmake:38 (include)
  CMakeLists.txt:187 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/cef_variables.cmake:19 (elseif):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "CYGWIN" will no longer be dereferenced when the
  policy is set to NEW.  Since the policy is not set the OLD behavior will be
  used.
Call Stack (most recent call first):
  cmake/FindCEF.cmake:38 (include)
  CMakeLists.txt:187 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/cef_variables.cmake:22 (elseif):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "CYGWIN" will no longer be dereferenced when the
  policy is set to NEW.  Since the policy is not set the OLD behavior will be
  used.
Call Stack (most recent call first):
  cmake/FindCEF.cmake:38 (include)
  CMakeLists.txt:187 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at libcef_dll/CMakeLists.txt:7 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "CYGWIN" will no longer be dereferenced when the
  policy is set to NEW.  Since the policy is not set the OLD behavior will be
  used.
Call Stack (most recent call first):
  libcef_dll/CMakeLists.txt:433 (LIBCEF_APPEND_PLATFORM_SOURCES)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at libcef_dll/CMakeLists.txt:10 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "CYGWIN" will no longer be dereferenced when the
  policy is set to NEW.  Since the policy is not set the OLD behavior will be
  used.
Call Stack (most recent call first):
  libcef_dll/CMakeLists.txt:433 (LIBCEF_APPEND_PLATFORM_SOURCES)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at libcef_dll/CMakeLists.txt:13 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "CYGWIN" will no longer be dereferenced when the
  policy is set to NEW.  Since the policy is not set the OLD behavior will be
  used.
Call Stack (most recent call first):
  libcef_dll/CMakeLists.txt:433 (LIBCEF_APPEND_PLATFORM_SOURCES)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at cmake/cef_macros.cmake:263 (add_library):
  add_library called with IMPORTED argument but no library type.
Call Stack (most recent call first):
  tests/cefclient/CMakeLists.txt:383 (ADD_LOGICAL_TARGET)


CMake Error at cmake/cef_macros.cmake:263 (add_library):
  add_library called with IMPORTED argument but no library type.
Call Stack (most recent call first):
  tests/cefsimple/CMakeLists.txt:85 (ADD_LOGICAL_TARGET)


CMake Error at cmake/cef_macros.cmake:263 (add_library):
  add_library called with IMPORTED argument but no library type.
Call Stack (most recent call first):
  tests/ceftests/CMakeLists.txt:307 (ADD_LOGICAL_TARGET)


-- *** CEF CONFIGURATION SETTINGS ***
-- Generator:                    Unix Makefiles
-- Platform:                     CYGWIN
-- Project architecture:         x86_64
-- Build type:                   Debug
-- Binary distribution root:     /home/lexes/cef_binary_3.3538.1849.g458cc98
_windows64
-- CEF sandbox:                  ON
-- Standard libraries:
-- Compile defines:              __STDC_CONSTANT_MACROS;__STDC_FORMAT_MACROS
-- Compile defines (Debug):
-- Compile defines (Release):
-- C compile flags:
-- C compile flags (Debug):
-- C compile flags (Release):
-- C++ compile flags:
-- C++ compile flags (Debug):
-- C++ compile flags (Release):
-- Exe link flags:
-- Exe link flags (Debug):
-- Exe link flags (Release):
-- Shared link flags:
-- Shared link flags (Debug):
-- Shared link flags (Release):
-- Configuring incomplete, errors occurred!
See also "/home/lexes/cef_binary_3.3538.1849.g458cc98_windows64/build/CMakeF
iles/CMakeOutput.log".

lexes@i3 ~/cef_binary_3.3538.1849.g458cc98_windows64/build
$


What do you think, why can this happen? Thank.
lexes
Newbie
 
Posts: 1
Joined: Sat Nov 03, 2018 6:51 am

Re: CMake Error at cmake/cef_macros.cmake:263 (add_library)

Postby magreenblatt » Sat Nov 03, 2018 10:24 am

Mingw is not supported. Install Visual Studio (free version works) and use a standard cmd.exe shell. See instructions at the top of the CMakeLists.txt file.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 101 guests