Cycling74 / min-devkit

Tools, documentation, and reference implementation of a Max Package built using the Min-API.
MIT License
156 stars 30 forks source link

CMake problems on Windows 10 #185

Open mzed opened 3 years ago

mzed commented 3 years ago

I'm trying to build a package I made from Max. I did this:

  1. Make new package "smoof" from Max
  2. Make new object "flurp," also from Max
  3. I was hoping to see Visual Studio open, but no joy
  4. I went to the command line (cmd) for my package and ran cmake -G "Visual Studio 16 2019" . . from the home directory of smoof
  5. It goes through the git stuff, but then fails on the line 25.

This line: include(${CMAKE_CURRENT_SOURCE_DIR}/source/min-api/script/min-package.cmake)

Gives me this error:

Reading C:/Users/Michael Zbyszynski/Documents/Max 8/Packages/smoof/package-info.json  
CMake Error at source/min-api/max-api/script/cmakepp/source/core/return/return.cmake:5 (macro):  
  Built-in flow control command "return" cannot be overridden.  
Call Stack (most recent call first):  
  source/min-api/max-api/script/cmakepp/source/core/require.cmake:9 (include)  
  source/min-api/max-api/script/cmakepp/cmakepp.cmake:63 (require)  
  source/min-api/max-api/script/max-package.cmake:20 (include)  
  source/min-api/script/min-package.cmake:4 (include)  
  CMakeLists.txt:25 (include)  

I don't know cmakepp at all. There's not much recent action in the repository.

isabelgk commented 3 years ago

Hi!

Can you try updating your submodules? The max-api repo has been updated to handle this error: https://github.com/Cycling74/max-api/commit/d84bd8a07ffe84ec60d8d1ad71ea5b7e5584bf30

mzed commented 3 years ago

I cloned max-api from github and manually copied it into the version of min-devkit that I got using the Max package manager. I can verify that this works as expected, and I'm able to create and build a test object.

Thanks!

PS: I think the version of min-api that min-devkit includes is still including an older version of max-api as a submodule.

isabelgk commented 3 years ago

Thanks for the catch! The min-api version looks correct to me on GitHub here, but the Package Manager version hasn't been updated since this fix to the max-api. I believe the Package Manager bundles the min-api and max-api instead of using submodules, so the changes didn't propagate.

It should be all fixed in the next Package Manager release.

mzed commented 3 years ago

That version of min-api looks correct. But, I think min-devkit is still linking to this version. In other words, min-api is up-to-date but min-devkit is still using an older version.

I could be wrong; subtrees confuse me sometimes.