mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-10-06 07:00:16 +08:00
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:
@@ -54,6 +54,7 @@ jobs:
|
||||
':!build/bakefiles/make_dist.mk' \
|
||||
':!build/bakefiles/scintilla.bkl' \
|
||||
':!docs/doxygen/doxygen-awesome-css/*' \
|
||||
':!samples/widgets/widgets.bkl' \
|
||||
':!tests/test.bkl' \
|
||||
':!**/*akefile*' \
|
||||
':!**/*.pbxproj' \
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user