opengl-tutorials/ogl

Tutorial 01 Instructions for OSX do not work

nfgallimore opened this issue · 5 comments

http://www.opengl-tutorial.org/beginners-tutorials/tutorial-1-opening-a-window/

CMake instructions fail to configure and generate the xcode project.

i also have this problem on macos mojave v. 10.14.5

my steps:

  • opened xcode version 10.3
  • brew install cmake: installed cmake version 3.15.1
  • downloaded source code from http://www.opengl-tutorial.org/download/ (Tutorials source code on GitHub, .zip). unzipped to ~/Downloads/
  • downloaded cmake .dmg (cmake-3.15.1-Darwin-x86_64.dmg)
  • opened cmake
  • Where is the source code: /Users/name/Downloads/ogl-master/distrib
  • Where to build the binaries: /Users/name/Documents/some/folders/build
  • clicked configure, i dont remember quite well the dialog box that showed up but i chose xcode in the drop down menu & left the first check box checked and the remaining three unchecked
  • clicked done, dialog box popped up saying Error in configuration process, project files may be invalid
  • values shown:
    • CMAKE_BACKWARDS_COMPATIBILITY: 2.4
    • CMAKE_CONFIGURATION_TYPES: Debug;Release;MinSizeRel;RelWithDebInfo
    • CMAKE_INSTALL_PREFIX: /usr/local
    • CMAKE_OSX_ARCHITECTURES:
    • CMAKE_OSX_DEPLOYMENT_TARGET:
    • CMAKE_OSX_SYSROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
    • EXECUTABLE_OUTPUT_PATH:
    • LIBRARY_OUTPUT_PATH:
  • console:

CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as

project(ProjectName)

near the top of the file, but after cmake_minimum_required().

CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.

The C compiler identification is unknown
The CXX compiler identification is unknown
CMake Error in CMakeLists.txt:
No CMAKE_C_COMPILER could be found.

CMake Error in CMakeLists.txt:
No CMAKE_CXX_COMPILER could be found.

CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.15)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

Configuring incomplete, errors occurred!
See also "/Users/name/Documents/some/folders/opengl/build/CMakeFiles/CMakeOutput.log".
See also "/Users/name/Documents/some/folders/opengl/build/CMakeFiles/CMakeError.log".

No worries thanks for the response.

Hi everyone, I also get this issue. Do you know if a solution has been documented somewhere? Thanks a lot.

Update: found on this random page through a Google search. This did it for me:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Hey! It still actual for someone.