CMake Parsing Issue on macOS

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 Parsing Issue on macOS

Postby scrubadub » Mon Mar 27, 2017 3:15 pm

Hi all, I'm interested in evaluating CEF for a project on macOS and have been battling with some CMake issues for the last few days. I'm hoping I'm missing some silly minor step, or that someone here can point me in the right direction. I've got what I think is adequate working knowledge on Xcode, but am less familiar with CMake's own quirks, etc.

Machine setup-
* I'm running macOS Sierra w/ Xcode and its command line tools are totally up to date, I've also installed CMake version 3.7.2 directly from cmake.org
* I'm presently working with branch release 2987, though I've also tried 3029 before coming here, to see if that branch resolved my issues (no such luck, yet), I've also tried getting branch 2987 via the automate-git.py script to see if that made a difference, but that copy of the branch I received is presenting me with the same stumbling blocks

What I'm looking to do-
* Generate the Xcode project files via the cmake commands outlined in the comments of CMakeLists.txt so I can play with the test apps like cefsimple and cefclient, I've downloaded the cefclient demo app from here. It works as expected on my Mac development machine, so I wanted to take a deeper dive with the Xcode projects rather than reinvent the wheel from scratch myself using a binary distribution.
* I HAVE tried building via the ninja commands instead of Xcode as outlined in CMakeLists.txt, but I get the same result, so I don't think it is specifically an Xcode problem

How far I've gotten-
* Cloned the branch I wanted into workspace, successfully
* Ran
Code: Select all
mkdir build && cd build
from within the root of my local copy of 2987, also worked with no problems
* Tried to run this console command given in CMakeLists.txt-
Code: Select all
cmake -G "Xcode" -DPROJECT_ARCH="x86_64" ..

* CMake throws an error in the command line, saying it can't find CMakeLists.txt, upon further inspection the CEF CMakeLists.txt, the nested CMakeLists.txt files found in the /tests/ sample projects, the CMakeLists.txt in the /libcef_dll/ dir, and the three CMake files in the /cmake/ dir all have a trailing ".in" at the end of the fail name, both on Bitbucket and in my local copy
* I manually removed the trailing ".in" and CMake now starts to run using the same command that previously failed
* However, I now hit an error farther into the CMake process-
Code: Select all
CMake Error at libcef_dll/CMakeLists.txt:20:

  Parse error.  Expected a command name, got unquoted argument with text

  "{{".


The corressponding double braces look to be used for the SET_LIBRARY_TARGET_PROPERTIES command in the libcef_dll CMakeLists.txt file.

* Attempting to run the same command on a different branch, differently acquired branch, or even attempting the alternative ninja command (which all share the need to remove the trailing ".in" file extensions for the CMake files) all get held up at this spot in the CMake process.

Now what?
Again, not knowing much about the CMake tool or its syntax requirements, I'm curious what the hang-up is with these double brackets. It looks like they're wrapping a JSON object or something similar to act as a list of properties for the SET_LIBRARY_TARGET_PROPERTIES line that immediately follows the closing brackets. I'm willing to concede I've missed a key step or am doing something really silly that could be causing this problem though.

The only other possible hint I have is that it might be a settings issue with CMake (I think I've ruled out the possibility of a corrupted repo clone?), as the CMake website says to change environment variables for CMake to use the GNU C++ compiler,, but when running the command outlined above, CMake identifies my compiler as AppleClang.


Does anyone else have any experience with this issue? I've tried searching for downloads or repos of just the cefclient sample that includes the Xcode project files, as that would be sufficient for what I'm trying to acquire, but I'd like to know what's going wrong in this situation since I've invested the time already and am curious to learn.

Any hints/clues/comments/fixes/etc. would be much appreciated, and thanks for your time!
scrubadub
Newbie
 
Posts: 1
Joined: Mon Mar 27, 2017 11:12 am

Re: CMake Parsing Issue on macOS

Postby magreenblatt » Mon Mar 27, 2017 10:23 pm

magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Majestic-12 [Bot] and 91 guests