Compile Cocoa control example in Unix "widgets" sample makefile
Previously this was never done, as we couldn't determine if we were using Cocoa or not at generation time, but we can determine it in the makefile itself.
This commit is contained in:
parent
c9c213553a
commit
2e22666db8
3 changed files with 25 additions and 1 deletions
|
|
@ -220,5 +220,14 @@ widgets_widgets.o: ./widgets.cpp
|
|||
.PHONY: all install uninstall clean
|
||||
|
||||
|
||||
widgets_native_wrapper.o: ./native_wrapper.mm ./native.cpp
|
||||
$(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(OBJCXXFLAGS) ./native_wrapper.mm
|
||||
|
||||
ifeq ($(WX_PORT),osx_cocoa)
|
||||
WIDGETS_OBJECTS += widgets_native_wrapper.o
|
||||
|
||||
widgets: widgets_native_wrapper.o
|
||||
endif
|
||||
|
||||
# Dependencies tracking:
|
||||
-include ./*.d
|
||||
|
|
|
|||
|
|
@ -13,13 +13,27 @@
|
|||
-->
|
||||
<set var="NATIVE_OBJCPP_SRC">
|
||||
<if cond="OUT_OF_TREE_MAKEFILES=='1'">
|
||||
<!-- We can't determine if we're using Cocoa or not, assume we don't -->
|
||||
<!--
|
||||
We can't determine if we're using Cocoa or not at generation
|
||||
time, so deal with it in the makefile fragment below.
|
||||
-->
|
||||
</if>
|
||||
<if cond="TOOLKIT=='OSX_COCOA' and WXUNIV=='0'">
|
||||
native_wrapper.mm
|
||||
</if>
|
||||
</set>
|
||||
|
||||
<fragment format="gnu">
|
||||
widgets_native_wrapper.o: ./native_wrapper.mm ./native.cpp
|
||||
$(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(OBJCXXFLAGS) ./native_wrapper.mm
|
||||
|
||||
ifeq ($(WX_PORT),osx_cocoa)
|
||||
WIDGETS_OBJECTS += widgets_native_wrapper.o
|
||||
|
||||
widgets: widgets_native_wrapper.o
|
||||
endif
|
||||
</fragment>
|
||||
|
||||
<exe id="widgets" template="wx_sample" template_append="wx_append">
|
||||
<sources>
|
||||
activityindicator.cpp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue