Coder Social home page Coder Social logo

mulle-xcode-to-cmake's Issues

CMake project name not quoted when name contains spaces

When generating a CMakeLists.txt file for an Xcode project which includes space characters in its name: https://github.com/saxbophone/Blank-Mack-Oss-Screensaver/tree/f2487de098cde50e4901b5259989889923dc5f06

The CMake file does not quote the project name that contains spaces: https://github.com/saxbophone/Blank-Mack-Oss-Screensaver/blob/ccf8ed83ec45cf7d74b7f4967e6359b3365f02a1/CMakeLists.txt#L1-L5

# Generated on 2019-4-16 1:50:56 by version CURRENT_PROJECT_VERSION of mulle-xcode-to-cmake 
# Command line: 
#    mulle-xcode-to-cmake export Blank Mack-Oss Screensaver.xcodeproj/ 

project( Blank Mack-Oss Screensaver) 

This is inconvenient because it leads to a CMake file that will not build, the project name has to be quoted if it contains spaces due to CMake argument-passing conventions.

This issue is present in v0.7.1 and at least one other earlier version too.

PROJECT() called before CMAKE_MINIMUM_REQUIRED() in CMake export

When exporting this Xcode project I have: https://github.com/saxbophone/Blank-Mack-Oss-Screensaver/tree/f2487de098cde50e4901b5259989889923dc5f06

The generated CMakeLists.txt file contains a call to project() first, before a call to cmake_minimum_required(): https://github.com/saxbophone/Blank-Mack-Oss-Screensaver/blob/ccf8ed83ec45cf7d74b7f4967e6359b3365f02a1/CMakeLists.txt#L1-L7

# Generated on 2019-4-16 1:50:56 by version CURRENT_PROJECT_VERSION of mulle-xcode-to-cmake 
# Command line: 
#    mulle-xcode-to-cmake export Blank Mack-Oss Screensaver.xcodeproj/ 

project( Blank Mack-Oss Screensaver) 

cmake_minimum_required (VERSION 3.4) 

This can be problematic because if for example, I want to use features of project() that only a specific version of CMake includes (like the VERSION property), I need to specify the CMake version first.

I think in general, it is conventional to specify the minimum required CMake version before any other commands in a CMake file.

This issue is present in v0.7.1 and at least one other earlier version too.

error: tool 'xcodebuild' requires Xcode

$ brew install mulle-kybernetik/software/mulle-xcode-to-cmake
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from a8aed381c to 23da62471.
Updated 2 taps (homebrew/cask-versions and homebrew/core).
==> Updated Formulae
beagle              fatsort             [email protected]        netdata
bison               krakend             [email protected]        scrcpy
bitwarden-cli       libpq               meson               shfmt
botan               libtensorflow       mkvtoolnix          xonsh

==> Tapping mulle-kybernetik/software
Cloning into '/usr/local/Homebrew/Library/Taps/mulle-kybernetik/homebrew-software'...
remote: Enumerating objects: 53, done.
remote: Counting objects: 100% (53/53), done.
remote: Compressing objects: 100% (52/52), done.
remote: Total 53 (delta 21), reused 5 (delta 0), pack-reused 0
Unpacking objects: 100% (53/53), done.
Tapped 49 formulae (127 files, 82.7KB).
==> Installing mulle-xcode-to-cmake from mulle-kybernetik/software
==> Downloading https://github.com/mulle-nat/mulle-xcode-to-cmake/archive/0.7.0.
==> Downloading from https://codeload.github.com/mulle-nat/mulle-xcode-to-cmake/
######################################################################## 100.0%
==> xcodebuild DSTROOT=/usr/local/Cellar/mulle-xcode-to-cmake/0.7.0 INSTALL_PATH
Last 15 lines from /Users/nguyenhachi/Library/Logs/Homebrew/mulle-xcode-to-cmake/01.xcodebuild:
2018-11-12 14:06:31 +0700

xcodebuild
DSTROOT=/usr/local/Cellar/mulle-xcode-to-cmake/0.7.0
INSTALL_PATH=/bin
install

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/mulle-kybernetik/homebrew-software/issues

Syntax error with `set_target_properties`.

I am trying to convert the MoltenVK xcodeprojs into CMakeLists.txt files using this software and while things work really well, far better than I expected, I am getting syntax errors due to an extra paren being emitted as follows:

set_target_properties( MoltenVK-macOS_shared
   PROPERTIES
   OUTPUT_NAME MoltenVK-macOS)
)

We see a closing paren after the output name then another on the next line.

When exporting targets that are Core Foundation Bundles, properties are set twice

This project is a macOS Screensaver: https://github.com/saxbophone/Blank-Mack-Oss-Screensaver/tree/f2487de098cde50e4901b5259989889923dc5f06

If I understand correctly, macOS Screensavers are Core Foundation Bundles (plugin-style).

When exporting such an Xcode project to CMake, set_target_properties() is called twice on the Bundle target:

if (APPLE)
   set_target_properties( Blank-Mack-Oss-Screensaver PROPERTIES
BUNDLE TRUE
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Blank-Mack-Oss-Screensaver-Info.plist.in"
)
endif()

if (APPLE)
   set_target_properties( Blank-Mack-Oss-Screensaver PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Blank-Mack-Oss-Screensaver-Info.plist.in"
)
endif()

Note that only the first of these has the property BUNDLE set to TRUE.

This isn't massively inconvenient and I confess to not know enough about Xcode project internals to know if it is something that can easily be addressed, but it does seem erroneous.

This issue is present in v0.7.1 and at least one other earlier version too.

Fails to correct paths from "hidden" Xcode projects

Xcode projects do not have to be in the project root directory, but can be in a subdirectory.
For example, VLC ships a vlc.xcodeproj as extras/package/macosx/vlc.xcodeproj.
mulle-xcode-to-cmake creates a CMakeSourcesAndHeaders.txt file that contains paths that are
relative to the .xcodeproj file's directory, instead of relative to the toplevel directory
(if that's where mulle-xcode-to-cmake is invoked).

[kudos] also runs on Linux using GNUstep :)

Just a little heads/thumbs-up/kudo : it wasn't very hard to get this application to build and run on Linux - and thus presumably on any other platform that has GNUstep and clang (just libgnustep-base and libobjc).

I could probably have made a CMake file by hand, but I just ran the app on its own xcodeproj file on Mac and edited it so it finds the required GNUstep dependencies: CMakeLists.txt.
Then it was a question of a few minor changes to the code: there's no [NSString constainsString:] (on Mac it's only available on 10.10 and later BTW), nor a NSDebugEnabled. Patches:
https://github.com/RJVB/lnxports/blob/master/devel/mulle-xcode-to-cmake/files/patch-containsString.diff
https://github.com/RJVB/lnxports/blob/master/devel/mulle-xcode-to-cmake/files/patch-gnustep.diff

Failed homebrew install

Seems like brew is broken, at least for me. (MacOS Sierra, XCode 9)

Transcript as follows. Snipped usual homebrew update cruft;-

Cloning into '/usr/local/Homebrew/Library/Taps/mulle-kybernetik/homebrew-software'...
remote: Counting objects: 31, done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 31 (delta 18), reused 2 (delta 0), pack-reused 0
Unpacking objects: 100% (31/31), done.
Tapped 28 formulae (82 files, 59.3KB)
==> Installing mulle-xcode-to-cmake from mulle-kybernetik/software
==> Downloading https://github.com/mulle-nat/mulle-xcode-to-cmake/archive/0.6.5.tar.gz
==> Downloading from https://codeload.github.com/mulle-nat/mulle-xcode-to-cmake/tar.gz/0.6.5
######################################################################## 100.0%
==> xcodebuild install -target mulle-xcode-to-cmake DSTROOT=/ INSTALL_PATH=/usr/local/Cellar/mulle-xcode-to-cmake/0.6.5/bin
Last 15 lines from /Users/shayneoneill/Library/Logs/Homebrew/mulle-xcode-to-cmake/01.xcodebuild:
error: open /usr/local/include/NSString+LeadingDotExpansion.h: Operation not permitted

** INSTALL FAILED **


The following build commands failed:
	CpHeader src/PBXWriting/MullePBXArchiver.h /usr/local/include/MullePBXArchiver.h
	CpHeader src/PBXReading/MullePBXUnarchiver.h /usr/local/include/MullePBXUnarchiver.h
	CpHeader src/PBXReading/PBXObject.h /usr/local/include/PBXObject.h
	CpHeader src/PBXWriting/PBXObject+PBXEncoding.h /usr/local/include/PBXObject+PBXEncoding.h
	CpHeader src/PBXWriting/MulleSortedKeyDictionary.h /usr/local/include/MulleSortedKeyDictionary.h
	CpHeader src/PBXReading/NSObject+DecodeWithObjectStorage.h /usr/local/include/NSObject+DecodeWithObjectStorage.h
	CpHeader src/PBXReading/NSString+KeyFromSetterSelector.h /usr/local/include/NSString+KeyFromSetterSelector.h
	CpHeader src/PBXReading/NSString+LeadingDotExpansion.h /usr/local/include/NSString+LeadingDotExpansion.h
(8 failures)

Failed case with Photoshop SDK

Hey,
I tried to use your product on the default photoshop plugin SDK project.
The files' paths in the output CmakeLists.txt file were incorrect and the plist definition seems to be incorrect

A zip of the project itself (without the full SDK):
poormanstypetool.xcodeproj.zip

Thanks!

Converting xcode with REZ files?

Hey
I'm in need of having rez -resource file generated from my xcode... any idea if this lib could be extended to support them?

Feature request: path modifier

I love this tool! Thank you for creating it!

Would be excellent addition ability to modify/extended path to files with some argument.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.