BUNDLE_EXTENSION doesn't apply for Xcode generator
When BUNDLE_EXTENSION is used with the Xcode generator, the extension does not change and stays as "bundle". When Unix Makefiles generator is used, the extension changes as expected.
Here is a sample project which reproduces the issue (using CMake 3.5.2 from homebrew, and Xcode 7.3.1):
cmake_minimum_required(VERSION 3.5)
project(mytest)
add_library(mytest MODULE main.c)
set_target_properties(mytest PROPERTIES BUNDLE true BUNDLE_EXTENSION "test")
main.c for completeness:
int main() { return 0; }
If you build with cmake -GXcode . && cmake --build .
the output is "mytest.bundle", but if you build with cmake . && cmake --build .
the output is "mytest.test".
It appears the WRAPPER_EXTENSION
Xcode setting is not getting applied. The current workaround is:
set_target_properties(mytest PROPERTIES XCODE_ATTRIBUTE_WRAPPER_EXTENSION "test")