Merge branch 'cmake-ios' of https://github.com/MaartenBent/wxWidgets
Build wxiOS on Travis CI. See https://github.com/wxWidgets/wxWidgets/pull/1895
This commit is contained in:
@@ -49,6 +49,10 @@ matrix:
|
|||||||
osx_image: xcode11.4
|
osx_image: xcode11.4
|
||||||
env: wxCONFIGURE_FLAGS="--enable-monolithic --with-cxx=17 --host=i686-apple-darwin_sim --build=x86_64-apple-darwin17.7.0 --with-osx_iphone --with-macosx-version-min=10.0 --with-macosx-sdk=$(xcrun --sdk iphonesimulator --show-sdk-path) --enable-stl --disable-sys-libs" wxSKIP_GUI=1 wxSKIP_TESTING=1 wxSKIP_SAMPLES=1
|
env: wxCONFIGURE_FLAGS="--enable-monolithic --with-cxx=17 --host=i686-apple-darwin_sim --build=x86_64-apple-darwin17.7.0 --with-osx_iphone --with-macosx-version-min=10.0 --with-macosx-sdk=$(xcrun --sdk iphonesimulator --show-sdk-path) --enable-stl --disable-sys-libs" wxSKIP_GUI=1 wxSKIP_TESTING=1 wxSKIP_SAMPLES=1
|
||||||
name: wxOSX iOS Xcode 11.4
|
name: wxOSX iOS Xcode 11.4
|
||||||
|
- os: osx
|
||||||
|
osx_image: xcode11.4
|
||||||
|
env: wxTOOLSET=cmake wxCMAKE_GENERATOR=Xcode wxCMAKE_DEFINES="-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_FIND_ROOT_PATH=/usr/local -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12" wxCMAKE_SAMPLES=OFF wxCMAKE_TESTS=OFF
|
||||||
|
name: wxOSX iOS CMake Xcode 11.4
|
||||||
- dist: bionic
|
- dist: bionic
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env: wxCONFIGURE_FLAGS="--with-x11 --enable-pch --disable-stc" wxSKIP_SAMPLES=1
|
env: wxCONFIGURE_FLAGS="--with-x11 --enable-pch --disable-stc" wxSKIP_SAMPLES=1
|
||||||
|
@@ -226,10 +226,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
|||||||
src/osx/cocoa/utils.mm
|
src/osx/cocoa/utils.mm
|
||||||
</set>
|
</set>
|
||||||
|
|
||||||
<set var="BASE_AND_GUI_OSX_IPHONE_SRC" hints="files">
|
|
||||||
src/osx/iphone/utils.mm
|
|
||||||
</set>
|
|
||||||
|
|
||||||
<!-- Base files used by non-wxMac OS X builds -->
|
<!-- Base files used by non-wxMac OS X builds -->
|
||||||
<set var="BASE_OSX_NOTWXMAC_SRC" hints="files">
|
<set var="BASE_OSX_NOTWXMAC_SRC" hints="files">
|
||||||
$(BASE_UNIX_AND_DARWIN_NOTWXMAC_SRC)
|
$(BASE_UNIX_AND_DARWIN_NOTWXMAC_SRC)
|
||||||
@@ -2703,7 +2699,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
|
|||||||
|
|
||||||
<set var="OSX_IPHONE_HDR" hints="files">
|
<set var="OSX_IPHONE_HDR" hints="files">
|
||||||
wx/osx/iphone/chkconf.h
|
wx/osx/iphone/chkconf.h
|
||||||
wx/osx/iphone/evtloop.h
|
|
||||||
wx/osx/iphone/private.h
|
wx/osx/iphone/private.h
|
||||||
wx/generic/region.h
|
wx/generic/region.h
|
||||||
wx/osx/sound.h
|
wx/osx/sound.h
|
||||||
|
@@ -85,7 +85,7 @@ function(wx_write_config)
|
|||||||
set(WX_CHARTYPE ansi)
|
set(WX_CHARTYPE ansi)
|
||||||
set(lib_unicode_suffix)
|
set(lib_unicode_suffix)
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_CROSSCOMPILING)
|
if(CMAKE_CROSSCOMPILING AND NOT IPHONE)
|
||||||
set(cross_compiling yes)
|
set(cross_compiling yes)
|
||||||
set(host_alias ${CMAKE_SYSTEM_NAME})
|
set(host_alias ${CMAKE_SYSTEM_NAME})
|
||||||
else()
|
else()
|
||||||
|
@@ -153,10 +153,6 @@ set(BASE_AND_GUI_OSX_COCOA_SRC
|
|||||||
src/osx/cocoa/power.mm
|
src/osx/cocoa/power.mm
|
||||||
)
|
)
|
||||||
|
|
||||||
set(BASE_AND_GUI_OSX_IPHONE_SRC
|
|
||||||
src/osx/iphone/utils.mm
|
|
||||||
)
|
|
||||||
|
|
||||||
set(BASE_OSX_NOTWXMAC_SRC
|
set(BASE_OSX_NOTWXMAC_SRC
|
||||||
${BASE_UNIX_AND_DARWIN_NOTWXMAC_SRC}
|
${BASE_UNIX_AND_DARWIN_NOTWXMAC_SRC}
|
||||||
${BASE_COREFOUNDATION_SRC}
|
${BASE_COREFOUNDATION_SRC}
|
||||||
@@ -2573,7 +2569,6 @@ set(OSX_IPHONE_SRC
|
|||||||
|
|
||||||
set(OSX_IPHONE_HDR
|
set(OSX_IPHONE_HDR
|
||||||
wx/osx/iphone/chkconf.h
|
wx/osx/iphone/chkconf.h
|
||||||
wx/osx/iphone/evtloop.h
|
|
||||||
wx/osx/iphone/private.h
|
wx/osx/iphone/private.h
|
||||||
wx/generic/region.h
|
wx/generic/region.h
|
||||||
wx/osx/sound.h
|
wx/osx/sound.h
|
||||||
@@ -3046,11 +3041,16 @@ set(OPENGL_GTK_HDR
|
|||||||
wx/unix/glx11.h
|
wx/unix/glx11.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(OPENGL_OSX_SHARED_SRC
|
set(OPENGL_OSX_COCOA_SRC
|
||||||
src/osx/cocoa/glcanvas.mm
|
src/osx/cocoa/glcanvas.mm
|
||||||
src/osx/glcanvas_osx.cpp
|
src/osx/glcanvas_osx.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(OPENGL_OSX_IPHONE_SRC
|
||||||
|
src/osx/iphone/glcanvas.mm
|
||||||
|
src/osx/glcanvas_osx.cpp
|
||||||
|
)
|
||||||
|
|
||||||
set(UNIX_SOUND_SDL_SRC
|
set(UNIX_SOUND_SDL_SRC
|
||||||
src/unix/sound_sdl.cpp
|
src/unix/sound_sdl.cpp
|
||||||
)
|
)
|
||||||
|
@@ -385,7 +385,12 @@ if(wxUSE_GUI)
|
|||||||
|
|
||||||
# extra dependencies
|
# extra dependencies
|
||||||
if(wxUSE_OPENGL)
|
if(wxUSE_OPENGL)
|
||||||
find_package(OpenGL)
|
if(WXOSX_IPHONE)
|
||||||
|
set(OPENGL_FOUND TRUE)
|
||||||
|
set(OPENGL_LIBRARIES "-framework OpenGLES" "-framework QuartzCore")
|
||||||
|
else()
|
||||||
|
find_package(OpenGL)
|
||||||
|
endif()
|
||||||
if(NOT OPENGL_FOUND)
|
if(NOT OPENGL_FOUND)
|
||||||
message(WARNING "opengl not found, wxGLCanvas won't be available")
|
message(WARNING "opengl not found, wxGLCanvas won't be available")
|
||||||
wx_option_force_value(wxUSE_OPENGL OFF)
|
wx_option_force_value(wxUSE_OPENGL OFF)
|
||||||
@@ -538,17 +543,23 @@ endif()
|
|||||||
set(wxBUILD_PRECOMP_PREV ${wxBUILD_PRECOMP} CACHE INTERNAL "")
|
set(wxBUILD_PRECOMP_PREV ${wxBUILD_PRECOMP} CACHE INTERNAL "")
|
||||||
|
|
||||||
if(wxBUILD_PRECOMP)
|
if(wxBUILD_PRECOMP)
|
||||||
|
if(DEFINED CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED)
|
||||||
|
set(try_flags "-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=${CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED}")
|
||||||
|
endif()
|
||||||
if (CLEAN_PRECOMP_TEST)
|
if (CLEAN_PRECOMP_TEST)
|
||||||
try_compile(RESULT_VAR_CLEAN
|
try_compile(RESULT_VAR_CLEAN
|
||||||
"${wxBINARY_DIR}/CMakeFiles/cotire_test"
|
"${wxBINARY_DIR}/CMakeFiles/cotire_test"
|
||||||
"${wxSOURCE_DIR}/build/cmake/modules/cotire_test"
|
"${wxSOURCE_DIR}/build/cmake/modules/cotire_test"
|
||||||
CotireExample clean_cotire
|
CotireExample clean_cotire
|
||||||
|
CMAKE_FLAGS ${try_flags}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
try_compile(RESULT_VAR
|
try_compile(RESULT_VAR
|
||||||
"${wxBINARY_DIR}/CMakeFiles/cotire_test"
|
"${wxBINARY_DIR}/CMakeFiles/cotire_test"
|
||||||
"${wxSOURCE_DIR}/build/cmake/modules/cotire_test"
|
"${wxSOURCE_DIR}/build/cmake/modules/cotire_test"
|
||||||
CotireExample OUTPUT_VARIABLE OUTPUT_VAR
|
CotireExample
|
||||||
|
CMAKE_FLAGS ${try_flags}
|
||||||
|
OUTPUT_VARIABLE OUTPUT_VAR
|
||||||
)
|
)
|
||||||
|
|
||||||
# check if output has precompiled header warnings. The build can still succeed, so check the output
|
# check if output has precompiled header warnings. The build can still succeed, so check the output
|
||||||
|
@@ -17,9 +17,7 @@ if(WIN32)
|
|||||||
wx_append_sources(BASE_FILES BASE_AND_GUI_WIN32)
|
wx_append_sources(BASE_FILES BASE_AND_GUI_WIN32)
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
wx_append_sources(BASE_FILES BASE_OSX_SHARED)
|
wx_append_sources(BASE_FILES BASE_OSX_SHARED)
|
||||||
if(wxBUILD_TOOLKIT MATCHES "osx_iphone")
|
if(WXOSX_COCOA)
|
||||||
wx_append_sources(BASE_FILES BASE_AND_GUI_OSX_IPHONE)
|
|
||||||
else()
|
|
||||||
wx_append_sources(BASE_FILES BASE_AND_GUI_OSX_COCOA)
|
wx_append_sources(BASE_FILES BASE_AND_GUI_OSX_COCOA)
|
||||||
endif()
|
endif()
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
@@ -58,14 +56,19 @@ endif()
|
|||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
wx_lib_link_libraries(wxbase
|
wx_lib_link_libraries(wxbase
|
||||||
PRIVATE
|
|
||||||
"-framework Security"
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
"-framework Carbon"
|
|
||||||
"-framework Cocoa"
|
|
||||||
"-framework CoreFoundation"
|
"-framework CoreFoundation"
|
||||||
"-framework IOKit"
|
|
||||||
)
|
)
|
||||||
|
if(WXOSX_COCOA)
|
||||||
|
wx_lib_link_libraries(wxbase
|
||||||
|
PRIVATE
|
||||||
|
"-framework Security"
|
||||||
|
PUBLIC
|
||||||
|
"-framework Carbon"
|
||||||
|
"-framework Cocoa"
|
||||||
|
"-framework IOKit"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
wx_lib_link_libraries(wxbase PRIVATE dl)
|
wx_lib_link_libraries(wxbase PRIVATE dl)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -47,6 +47,9 @@ elseif(WXOSX_COCOA)
|
|||||||
wx_append_sources(CORE_SRC OSX_LOWLEVEL)
|
wx_append_sources(CORE_SRC OSX_LOWLEVEL)
|
||||||
wx_append_sources(CORE_SRC OSX_SHARED)
|
wx_append_sources(CORE_SRC OSX_SHARED)
|
||||||
wx_append_sources(CORE_SRC OSX_COCOA)
|
wx_append_sources(CORE_SRC OSX_COCOA)
|
||||||
|
elseif(WXOSX_IPHONE)
|
||||||
|
wx_append_sources(CORE_SRC OSX_LOWLEVEL)
|
||||||
|
wx_append_sources(CORE_SRC OSX_IPHONE)
|
||||||
elseif(WXQT)
|
elseif(WXQT)
|
||||||
wx_append_sources(CORE_SRC QT)
|
wx_append_sources(CORE_SRC QT)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
@@ -76,6 +79,15 @@ if(WXOSX_COCOA)
|
|||||||
wx_lib_link_libraries(wxcore PUBLIC "-framework WebKit")
|
wx_lib_link_libraries(wxcore PUBLIC "-framework WebKit")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
if(WXOSX_IPHONE)
|
||||||
|
wx_lib_link_libraries(wxcore
|
||||||
|
PUBLIC
|
||||||
|
"-framework AudioToolbox"
|
||||||
|
"-framework CoreGraphics"
|
||||||
|
"-framework CoreText"
|
||||||
|
"-framework UIKit"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
if(WXGTK AND wxUSE_PRIVATE_FONTS)
|
if(WXGTK AND wxUSE_PRIVATE_FONTS)
|
||||||
wx_lib_include_directories(wxcore PUBLIC ${FONTCONFIG_INCLUDE_DIRS} ${PANGOFT2_INCLUDE_DIRS})
|
wx_lib_include_directories(wxcore PUBLIC ${FONTCONFIG_INCLUDE_DIRS} ${PANGOFT2_INCLUDE_DIRS})
|
||||||
wx_lib_link_libraries(wxcore PUBLIC ${FONTCONFIG_LIBRARIES} ${PANGOFT2_LIBRARIES})
|
wx_lib_link_libraries(wxcore PUBLIC ${FONTCONFIG_LIBRARIES} ${PANGOFT2_LIBRARIES})
|
||||||
|
@@ -15,8 +15,10 @@ if(WXMSW)
|
|||||||
wx_append_sources(GL_FILES OPENGL_MSW)
|
wx_append_sources(GL_FILES OPENGL_MSW)
|
||||||
elseif(WXGTK)
|
elseif(WXGTK)
|
||||||
wx_append_sources(GL_FILES OPENGL_GTK)
|
wx_append_sources(GL_FILES OPENGL_GTK)
|
||||||
elseif(APPLE)
|
elseif(WXOSX_COCOA)
|
||||||
wx_append_sources(GL_FILES OPENGL_OSX_SHARED)
|
wx_append_sources(GL_FILES OPENGL_OSX_COCOA)
|
||||||
|
elseif(WXOSX_IPHONE)
|
||||||
|
wx_append_sources(GL_FILES OPENGL_OSX_IPHONE)
|
||||||
elseif(WXQT)
|
elseif(WXQT)
|
||||||
wx_append_sources(GL_FILES OPENGL_QT)
|
wx_append_sources(GL_FILES OPENGL_QT)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -15,6 +15,8 @@ if(WXMSW)
|
|||||||
wx_append_sources(MEDIA_FILES MEDIA_MSW)
|
wx_append_sources(MEDIA_FILES MEDIA_MSW)
|
||||||
elseif(WXOSX_COCOA)
|
elseif(WXOSX_COCOA)
|
||||||
wx_append_sources(MEDIA_FILES MEDIA_OSX_COCOA)
|
wx_append_sources(MEDIA_FILES MEDIA_OSX_COCOA)
|
||||||
|
elseif(WXOSX_IPHONE)
|
||||||
|
wx_append_sources(MEDIA_FILES MEDIA_OSX_IPHONE)
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
wx_append_sources(MEDIA_FILES MEDIA_UNIX)
|
wx_append_sources(MEDIA_FILES MEDIA_UNIX)
|
||||||
elseif(WXQT)
|
elseif(WXQT)
|
||||||
@@ -22,13 +24,11 @@ elseif(WXQT)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
wx_add_library(wxmedia ${MEDIA_FILES})
|
wx_add_library(wxmedia ${MEDIA_FILES})
|
||||||
if(WXOSX_COCOA)
|
if(WXOSX)
|
||||||
# TODO: add version detection of some kind and/or wx_option
|
|
||||||
wx_lib_compile_definitions(wxmedia PRIVATE -DwxOSX_USE_QTKIT=0)
|
|
||||||
wx_lib_link_libraries(wxmedia PUBLIC
|
wx_lib_link_libraries(wxmedia PUBLIC
|
||||||
"-framework AVFoundation"
|
"-framework AVFoundation"
|
||||||
"-framework AVKit"
|
|
||||||
"-framework CoreMedia"
|
"-framework CoreMedia"
|
||||||
|
"-weak_framework AVKit"
|
||||||
)
|
)
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
wx_lib_include_directories(wxmedia PUBLIC ${GSTREAMER_INCLUDE_DIRS})
|
wx_lib_include_directories(wxmedia PUBLIC ${GSTREAMER_INCLUDE_DIRS})
|
||||||
|
@@ -12,6 +12,10 @@ wx_option(wxUSE_GUI "Use GUI" ON)
|
|||||||
|
|
||||||
if(CMAKE_OSX_SYSROOT MATCHES iphoneos)
|
if(CMAKE_OSX_SYSROOT MATCHES iphoneos)
|
||||||
set(IPHONE ON)
|
set(IPHONE ON)
|
||||||
|
|
||||||
|
# workaround a bug where try_compile (and functions using it,
|
||||||
|
# like find_package, check_c_source_compiles) fails
|
||||||
|
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
@@ -20,18 +20,28 @@ if(wxUSE_XRC)
|
|||||||
|
|
||||||
set_target_properties(wxrc PROPERTIES FOLDER "Utilities")
|
set_target_properties(wxrc PROPERTIES FOLDER "Utilities")
|
||||||
|
|
||||||
wx_install(TARGETS wxrc RUNTIME DESTINATION "bin")
|
wx_install(TARGETS wxrc
|
||||||
|
RUNTIME DESTINATION "bin"
|
||||||
|
BUNDLE DESTINATION "bin"
|
||||||
|
)
|
||||||
|
|
||||||
|
if(IPHONE)
|
||||||
|
set(EXE_SUFFIX ".app")
|
||||||
|
else()
|
||||||
|
set(EXE_SUFFIX ${CMAKE_EXECUTABLE_SUFFIX})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
install(CODE "execute_process( \
|
install(CODE "execute_process( \
|
||||||
COMMAND ${CMAKE_COMMAND} -E rename \
|
COMMAND ${CMAKE_COMMAND} -E rename \
|
||||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc${CMAKE_EXECUTABLE_SUFFIX} \
|
${CMAKE_INSTALL_PREFIX}/bin/wxrc${EXE_SUFFIX} \
|
||||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION}${CMAKE_EXECUTABLE_SUFFIX} \
|
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION}${EXE_SUFFIX} \
|
||||||
)"
|
)"
|
||||||
)
|
)
|
||||||
install(CODE "execute_process( \
|
install(CODE "execute_process( \
|
||||||
COMMAND ${CMAKE_COMMAND} -E create_symlink \
|
COMMAND ${CMAKE_COMMAND} -E create_symlink \
|
||||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION}${CMAKE_EXECUTABLE_SUFFIX} \
|
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION}${EXE_SUFFIX} \
|
||||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc${CMAKE_EXECUTABLE_SUFFIX} \
|
${CMAKE_INSTALL_PREFIX}/bin/wxrc${EXE_SUFFIX} \
|
||||||
)"
|
)"
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
10
build/files
10
build/files
@@ -176,9 +176,6 @@ BASE_AND_GUI_OSX_COCOA_SRC =
|
|||||||
src/osx/cocoa/utils.mm
|
src/osx/cocoa/utils.mm
|
||||||
src/osx/cocoa/power.mm
|
src/osx/cocoa/power.mm
|
||||||
|
|
||||||
BASE_AND_GUI_OSX_IPHONE_SRC =
|
|
||||||
src/osx/iphone/utils.mm
|
|
||||||
|
|
||||||
# files used by non-wxMac OS X builds
|
# files used by non-wxMac OS X builds
|
||||||
BASE_OSX_NOTWXMAC_SRC =
|
BASE_OSX_NOTWXMAC_SRC =
|
||||||
$(BASE_UNIX_AND_DARWIN_NOTWXMAC_SRC)
|
$(BASE_UNIX_AND_DARWIN_NOTWXMAC_SRC)
|
||||||
@@ -2552,7 +2549,6 @@ OSX_IPHONE_SRC =
|
|||||||
OSX_IPHONE_HDR =
|
OSX_IPHONE_HDR =
|
||||||
wx/generic/region.h
|
wx/generic/region.h
|
||||||
wx/osx/iphone/chkconf.h
|
wx/osx/iphone/chkconf.h
|
||||||
wx/osx/iphone/evtloop.h
|
|
||||||
wx/osx/iphone/private.h
|
wx/osx/iphone/private.h
|
||||||
wx/osx/sound.h
|
wx/osx/sound.h
|
||||||
|
|
||||||
@@ -2984,10 +2980,14 @@ OPENGL_GTK_SRC =
|
|||||||
OPENGL_MSW_HDR =
|
OPENGL_MSW_HDR =
|
||||||
wx/msw/glcanvas.h
|
wx/msw/glcanvas.h
|
||||||
|
|
||||||
OPENGL_OSX_SHARED_SRC =
|
OPENGL_OSX_COCOA_SRC =
|
||||||
src/osx/cocoa/glcanvas.mm
|
src/osx/cocoa/glcanvas.mm
|
||||||
src/osx/glcanvas_osx.cpp
|
src/osx/glcanvas_osx.cpp
|
||||||
|
|
||||||
|
OPENGL_OSX_IPHONE_SRC =
|
||||||
|
src/osx/iphone/glcanvas.mm
|
||||||
|
src/osx/glcanvas_osx.cpp
|
||||||
|
|
||||||
# Misc plugin sources:
|
# Misc plugin sources:
|
||||||
|
|
||||||
UNIX_SOUND_SDL_SRC =
|
UNIX_SOUND_SDL_SRC =
|
||||||
|
@@ -6,31 +6,37 @@ set -e
|
|||||||
|
|
||||||
wxPROC_COUNT=`getconf _NPROCESSORS_ONLN`
|
wxPROC_COUNT=`getconf _NPROCESSORS_ONLN`
|
||||||
((wxPROC_COUNT++))
|
((wxPROC_COUNT++))
|
||||||
if [ "$wxTOOLSET" == "cmake" ] && [ "$wxCMAKE_GENERATOR" == "Xcode" ]; then
|
wxBUILD_ARGS="-j$wxPROC_COUNT"
|
||||||
wxJOBS="-jobs $wxPROC_COUNT"
|
|
||||||
else
|
|
||||||
wxJOBS="-j$wxPROC_COUNT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $wxTOOLSET in
|
case $wxTOOLSET in
|
||||||
cmake)
|
cmake)
|
||||||
if [ -z $wxCMAKE_TESTS ]; then wxCMAKE_TESTS=CONSOLE_ONLY; fi
|
if [ -z $wxCMAKE_TESTS ]; then wxCMAKE_TESTS=CONSOLE_ONLY; fi
|
||||||
|
if [ -z $wxCMAKE_SAMPLES ]; then wxCMAKE_SAMPLES=SOME; fi
|
||||||
|
if [ "$wxCMAKE_GENERATOR" == "Xcode" ]; then
|
||||||
|
wxBUILD_ARGS="-jobs $wxPROC_COUNT -quiet"
|
||||||
|
fi
|
||||||
cmake --version
|
cmake --version
|
||||||
|
|
||||||
echo 'travis_fold:start:configure'
|
echo 'travis_fold:start:configure'
|
||||||
echo 'Configuring...'
|
echo 'Configuring...'
|
||||||
mkdir build_cmake
|
mkdir build_cmake
|
||||||
pushd build_cmake
|
pushd build_cmake
|
||||||
cmake -G "$wxCMAKE_GENERATOR" $wxCMAKE_DEFINES -D wxBUILD_SAMPLES=SOME -D wxBUILD_TESTS=$wxCMAKE_TESTS ..
|
cmake -G "$wxCMAKE_GENERATOR" $wxCMAKE_DEFINES -D wxBUILD_SAMPLES=$wxCMAKE_SAMPLES -D wxBUILD_TESTS=$wxCMAKE_TESTS ..
|
||||||
echo 'travis_fold:end:configure'
|
echo 'travis_fold:end:configure'
|
||||||
|
|
||||||
echo 'travis_fold:start:building'
|
if [ "$wxCMAKE_GENERATOR" != "Xcode" ]; then
|
||||||
echo 'Building...'
|
echo 'travis_fold:start:building'
|
||||||
if [ "$wxCMAKE_GENERATOR" == "Xcode" ]; then
|
echo 'Building...'
|
||||||
wxTOOL_ARG="-quiet"
|
cmake --build . -- $wxBUILD_ARGS
|
||||||
|
echo 'travis_fold:end:building'
|
||||||
fi
|
fi
|
||||||
cmake --build . -- $wxJOBS $wxTOOL_ARG
|
|
||||||
echo 'travis_fold:end:building'
|
echo 'travis_fold:start:install'
|
||||||
|
if [ "$wxCMAKE_GENERATOR" == "Xcode" ]; then echo -n 'Building and '; fi
|
||||||
|
echo 'Installing...'
|
||||||
|
sudo env "PATH=$PATH" cmake --build . --target install -- $wxBUILD_ARGS
|
||||||
|
popd
|
||||||
|
echo 'travis_fold:end:install'
|
||||||
|
|
||||||
if [ "$wxCMAKE_TESTS" != "OFF" ]; then
|
if [ "$wxCMAKE_TESTS" != "OFF" ]; then
|
||||||
echo 'travis_fold:start:testing'
|
echo 'travis_fold:start:testing'
|
||||||
@@ -39,21 +45,18 @@ case $wxTOOLSET in
|
|||||||
echo 'travis_fold:end:testing'
|
echo 'travis_fold:end:testing'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo 'Installing...' && echo -en 'travis_fold:start:script.install\\r'
|
echo 'travis_fold:start:testinstall'
|
||||||
sudo env "PATH=$PATH" cmake --build . --target install
|
echo 'Testing installation...'
|
||||||
popd
|
|
||||||
echo -en 'travis_fold:end:script.install\\r'
|
|
||||||
|
|
||||||
echo 'Testing installation...' && echo -en 'travis_fold:start:script.testinstall\\r'
|
|
||||||
mkdir build_cmake_install_test
|
mkdir build_cmake_install_test
|
||||||
pushd build_cmake_install_test
|
pushd build_cmake_install_test
|
||||||
cmake "$wxCMAKE_GENERATOR" $wxCMAKE_DEFINES ../samples/minimal
|
cmake -G "$wxCMAKE_GENERATOR" $wxCMAKE_DEFINES ../samples/minimal
|
||||||
cmake --build .
|
cmake --build . -- $wxBUILD_ARGS
|
||||||
popd
|
popd
|
||||||
echo -en 'travis_fold:end:script.testinstall\\r'
|
echo 'travis_fold:end:testinstall'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo 'Configuring...' && echo -en 'travis_fold:start:script.configure\\r'
|
echo 'travis_fold:start:configure'
|
||||||
|
echo 'Configuring...'
|
||||||
./configure --disable-optimise --disable-debug_info $wxCONFIGURE_FLAGS || rc=$?
|
./configure --disable-optimise --disable-debug_info $wxCONFIGURE_FLAGS || rc=$?
|
||||||
if [ -n "$rc" ]; then
|
if [ -n "$rc" ]; then
|
||||||
echo '*** Configuring failed, contents of config.log follows: ***'
|
echo '*** Configuring failed, contents of config.log follows: ***'
|
||||||
@@ -62,25 +65,28 @@ case $wxTOOLSET in
|
|||||||
echo '-----------------------------------------------------------'
|
echo '-----------------------------------------------------------'
|
||||||
exit $rc
|
exit $rc
|
||||||
fi
|
fi
|
||||||
echo -en 'travis_fold:end:script.configure\\r'
|
echo 'travis_fold:end:configure'
|
||||||
|
|
||||||
echo 'Building...' && echo -en 'travis_fold:start:script.build\\r'
|
echo 'travis_fold:start:building'
|
||||||
make $wxJOBS
|
echo 'Building...'
|
||||||
echo -en 'travis_fold:end:script.build\\r'
|
make $wxBUILD_ARGS
|
||||||
|
echo 'travis_fold:end:building'
|
||||||
|
|
||||||
echo 'Building tests...' && echo -en 'travis_fold:start:script.tests\\r'
|
echo 'travis_fold:start:tests'
|
||||||
[ "$wxSKIP_GUI" = 1 ] || make -C tests $wxJOBS failtest
|
echo 'Building tests...'
|
||||||
make -C tests $wxJOBS $wxMAKEFILE_FLAGS
|
[ "$wxSKIP_GUI" = 1 ] || make -C tests $wxBUILD_ARGS failtest
|
||||||
echo -en 'travis_fold:end:script.tests\\r'
|
make -C tests $wxBUILD_ARGS $wxMAKEFILE_FLAGS
|
||||||
|
echo 'travis_fold:end:tests'
|
||||||
|
|
||||||
if [ "$wxSKIP_TESTING" = 1 ]; then
|
if [ "$wxSKIP_TESTING" = 1 ]; then
|
||||||
echo 'Skipping running tests'
|
echo 'Skipping running tests'
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo 'Testing...' && echo -en 'travis_fold:start:script.testing\\r'
|
echo 'travis_fold:start:testing'
|
||||||
|
echo 'Testing...'
|
||||||
pushd tests && ./test && popd
|
pushd tests && ./test && popd
|
||||||
echo -en 'travis_fold:end:script.testing\\r'
|
echo 'travis_fold:end:testing'
|
||||||
|
|
||||||
if [ "$wxSKIP_GUI" = 1 ]; then
|
if [ "$wxSKIP_GUI" = 1 ]; then
|
||||||
echo 'Skipping the rest of tests for non-GUI build.'
|
echo 'Skipping the rest of tests for non-GUI build.'
|
||||||
@@ -88,22 +94,26 @@ case $wxTOOLSET in
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$wxUSE_XVFB" = 1 ]; then
|
if [ "$wxUSE_XVFB" = 1 ]; then
|
||||||
echo 'Testing GUI using Xvfb...' && echo -en 'travis_fold:start:script.testing_gui\\r'
|
echo 'travis_fold:start:testing_gui'
|
||||||
|
echo 'Testing GUI using Xvfb...'
|
||||||
pushd tests && xvfb-run -a -s '-screen 0 1600x1200x24' ./test_gui && popd
|
pushd tests && xvfb-run -a -s '-screen 0 1600x1200x24' ./test_gui && popd
|
||||||
echo -en 'travis_fold:end:script.testing_gui\\r'
|
echo 'travis_fold:end:testing_gui'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo 'Building samples...' && echo -en 'travis_fold:start:script.samples\\r'
|
echo 'travis_fold:start:samples'
|
||||||
|
echo 'Building samples...'
|
||||||
(test "$wxSKIP_SAMPLES" && echo 'SKIPPED') || make samples
|
(test "$wxSKIP_SAMPLES" && echo 'SKIPPED') || make samples
|
||||||
echo -en 'travis_fold:end:script.samples\\r'
|
echo 'travis_fold:end:samples'
|
||||||
|
|
||||||
echo 'Installing...' && echo -en 'travis_fold:start:script.install\\r'
|
echo 'travis_fold:start:install'
|
||||||
|
echo 'Installing...'
|
||||||
sudo make install
|
sudo make install
|
||||||
echo -en 'travis_fold:end:script.install\\r'
|
echo 'travis_fold:end:install'
|
||||||
|
|
||||||
echo 'Testing installation...' && echo -en 'travis_fold:start:script.testinstall\\r'
|
echo 'travis_fold:start:testinstall'
|
||||||
|
echo 'Testing installation...'
|
||||||
make -C samples/minimal -f makefile.unx clean
|
make -C samples/minimal -f makefile.unx clean
|
||||||
make -C samples/minimal -f makefile.unx $wxMAKEFILE_FLAGS
|
make -C samples/minimal -f makefile.unx $wxMAKEFILE_FLAGS
|
||||||
echo -en 'travis_fold:end:script.testinstall\\r'
|
echo 'travis_fold:end:testinstall'
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Reference in New Issue
Block a user