haxpor / aseprite-macos-buildsh

Automated script to create latest release app (either beta, or release whichever is newer) of Aseprite for macOS
MIT License
155 stars 41 forks source link

Cmake c compiler not set #6

Closed Sam1370 closed 5 years ago

Sam1370 commented 5 years ago

I have this error although I have the xcode command lines tool installed:

CMake Deprecation Warning at CMakeLists.txt:15 (cmake_policy):
  The OLD behavior for policy CMP0046 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.

CMake Warning at /usr/local/Cellar/cmake/3.15.1/share/cmake/Modules/Platform/Darwin-Initialize.cmake:131 (message):
  Ignoring CMAKE_OSX_SYSROOT value:

   /Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk

  because the directory does not exist.
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.15.1/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake:21 (include)
  CMakeLists.txt:34 (project)

CMake Error at /usr/local/Cellar/cmake/3.15.1/share/cmake/Modules/CMakeDetermineCCompiler.cmake:49 (message):
  Could not find compiler set in environment variable CC:

  /Library/Developer/CommandLineTools/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc.
Call Stack (most recent call first):
  CMakeLists.txt:34 (project)

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
haxpor commented 5 years ago

Seem like it cannot find macOS sdk directory. Could you please make sure it's there /Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk?

And what is the result from executing this xcode-select -p on your terminal?

Sam1370 commented 5 years ago

Solved, I changed the variables at the beginning to match my system

POSTFIXPATH_SDKROOT=/SDKs/MacOSX10.14.sdk
CCPATH_TOOLCHAIN=/usr/bin/cc
CXXPATH_TOOLCHAIN=/usr/bin/c++
Sam1370 commented 5 years ago

@haxpor thanks for your help