We're using CMake here, so we can build on Windows, Linux, and macOS. So now I'm trying to convert from Xcode to CMake (which then generates an xcode project, whee).
The main problems I'm running into are figuring out which settings to do via CMakeLists.txt. That's mostly tiresome. But theres a new issue, and I don't know enough about CMake to figure it out: compiling my .swift
file generates a ${PROJECT}-Swift.h
file, which is used by the ObjC files. Which is great.
Except I don't know how to tell CMake about that. (And I haven't figured out what variable describes where Xcode puts it, but that's more of a tiresome issue than head-against-desk issue...)
Has anyone run into and hopefully figured this out?
I'm using
# What I *want* to do is have this copied somewhere.
# But I don't know how to tell XCode to do that.
set_target_properties(LibraryControl PROPERTIES
XCODE_ATTRIBUTE_SWIFT_OBJC_INTERFACE_HEADER_NAME "LibraryControl-Swift.h"
XCODE_ATTRIBUTE_DERIVED_FILE_DIR "${PROJECT_BINARY_DIR}"
XCODE_ATTRIBUTE_SWIFT_OBJC_BRIDGING_HEADER "${PROJECT_SOURCE_DIR}/common/mac/LibraryControl-Bridging-Header.h"
)
and then set target_include_directories
appropriately in the other CMakeLists.txt files.