Merge pull request #812 from jbfove/master
Build fixes for CMake monolithic build. Also fix building with wxUSE_{DISPLAY,PALETTE}==0.
This commit is contained in:
@@ -35,7 +35,7 @@ function(wx_add_demo name)
|
|||||||
if(wxBUILD_SHARED)
|
if(wxBUILD_SHARED)
|
||||||
target_compile_definitions(${DEMO_NAME} PRIVATE WXUSINGDLL)
|
target_compile_definitions(${DEMO_NAME} PRIVATE WXUSINGDLL)
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(${DEMO_NAME} core ${DEMO_LIBRARIES})
|
wx_exe_link_libraries(${DEMO_NAME} core ${DEMO_LIBRARIES})
|
||||||
wx_set_common_target_properties(${DEMO_NAME})
|
wx_set_common_target_properties(${DEMO_NAME})
|
||||||
set_target_properties(${DEMO_NAME} PROPERTIES FOLDER "Demos")
|
set_target_properties(${DEMO_NAME} PROPERTIES FOLDER "Demos")
|
||||||
set_target_properties(${DEMO_NAME} PROPERTIES
|
set_target_properties(${DEMO_NAME} PROPERTIES
|
||||||
|
@@ -20,19 +20,24 @@ include(CMakePrintHelpers)
|
|||||||
|
|
||||||
# This function adds a list of headers to a variable while prepending
|
# This function adds a list of headers to a variable while prepending
|
||||||
# include/ to the path
|
# include/ to the path
|
||||||
function(wx_add_headers src_var)
|
macro(wx_add_headers src_var)
|
||||||
set(headers)
|
set(headers)
|
||||||
list(REMOVE_AT ARGV 0)
|
foreach(header ${ARGN})
|
||||||
foreach(header ${ARGV})
|
|
||||||
list(APPEND headers ${wxSOURCE_DIR}/include/${header})
|
list(APPEND headers ${wxSOURCE_DIR}/include/${header})
|
||||||
if(header MATCHES "\\.cpp$")
|
if(header MATCHES "\\.cpp$")
|
||||||
# .cpp files in include directory should not be compiled
|
# .cpp files in include directory should not be compiled
|
||||||
set_source_files_properties(${wxSOURCE_DIR}/include/${header}
|
if (wxBUILD_MONOLITHIC)
|
||||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
# set_source_files_properties only works within the same CMakeLists.txt
|
||||||
|
list(APPEND wxMONO_NONCOMPILED_CPP_FILES ${wxSOURCE_DIR}/include/${header})
|
||||||
|
set(wxMONO_NONCOMPILED_CPP_FILES ${wxMONO_NONCOMPILED_CPP_FILES} PARENT_SCOPE)
|
||||||
|
else()
|
||||||
|
set_source_files_properties(${wxSOURCE_DIR}/include/${header}
|
||||||
|
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
set(${src_var} ${${src_var}} ${headers} PARENT_SCOPE)
|
list(APPEND ${src_var} ${headers})
|
||||||
endfunction()
|
endmacro()
|
||||||
|
|
||||||
# Add sources from a ..._SRC variable and headers from a ..._HDR
|
# Add sources from a ..._SRC variable and headers from a ..._HDR
|
||||||
macro(wx_append_sources src_var source_base_name)
|
macro(wx_append_sources src_var source_base_name)
|
||||||
@@ -269,45 +274,45 @@ endfunction()
|
|||||||
# first parameter is the name of the library
|
# first parameter is the name of the library
|
||||||
# if the second parameter is set to IS_BASE a non UI lib is created
|
# if the second parameter is set to IS_BASE a non UI lib is created
|
||||||
# all additional parameters are source files for the library
|
# all additional parameters are source files for the library
|
||||||
function(wx_add_library name)
|
macro(wx_add_library name)
|
||||||
cmake_parse_arguments(wxADD_LIBRARY "IS_BASE" "" "" ${ARGN})
|
cmake_parse_arguments(wxADD_LIBRARY "IS_BASE" "" "" ${ARGN})
|
||||||
set(src_files ${wxADD_LIBRARY_UNPARSED_ARGUMENTS})
|
set(src_files ${wxADD_LIBRARY_UNPARSED_ARGUMENTS})
|
||||||
|
|
||||||
if(wxBUILD_MONOLITHIC AND NOT name STREQUAL "mono")
|
if(wxBUILD_MONOLITHIC AND NOT ${name} STREQUAL "mono")
|
||||||
# collect all source files for mono library
|
# collect all source files for mono library
|
||||||
set(wxMONO_SRC_FILES ${wxMONO_SRC_FILES} ${src_files} PARENT_SCOPE)
|
set(wxMONO_SRC_FILES ${wxMONO_SRC_FILES} ${src_files} PARENT_SCOPE)
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(wxBUILD_PRECOMP AND MSVC)
|
|
||||||
# Add dummy source file to be used by cotire for PCH creation
|
|
||||||
list(INSERT src_files 0 "${wxSOURCE_DIR}/src/common/dummy.cpp")
|
|
||||||
endif()
|
|
||||||
list(APPEND src_files ${wxSETUP_HEADER_FILE})
|
|
||||||
|
|
||||||
if(wxBUILD_SHARED)
|
|
||||||
set(wxBUILD_LIB_TYPE SHARED)
|
|
||||||
if(WIN32)
|
|
||||||
# Add WIN32 version information
|
|
||||||
list(APPEND src_files "${wxSOURCE_DIR}/src/msw/version.rc" "${wxSOURCE_DIR}/include/wx/msw/genrcdefs.h")
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
set(wxBUILD_LIB_TYPE STATIC)
|
|
||||||
|
if(wxBUILD_PRECOMP AND MSVC)
|
||||||
|
# Add dummy source file to be used by cotire for PCH creation
|
||||||
|
list(INSERT src_files 0 "${wxSOURCE_DIR}/src/common/dummy.cpp")
|
||||||
|
endif()
|
||||||
|
list(APPEND src_files ${wxSETUP_HEADER_FILE})
|
||||||
|
|
||||||
|
if(wxBUILD_SHARED)
|
||||||
|
set(wxBUILD_LIB_TYPE SHARED)
|
||||||
|
if(WIN32)
|
||||||
|
# Add WIN32 version information
|
||||||
|
list(APPEND src_files "${wxSOURCE_DIR}/src/msw/version.rc" "${wxSOURCE_DIR}/include/wx/msw/genrcdefs.h")
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set(wxBUILD_LIB_TYPE STATIC)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(${name} ${wxBUILD_LIB_TYPE} ${src_files})
|
||||||
|
wx_set_target_properties(${name} ${wxADD_LIBRARY_IS_BASE})
|
||||||
|
|
||||||
|
# Setup install
|
||||||
|
wx_install(TARGETS ${name}
|
||||||
|
LIBRARY DESTINATION "lib${wxPLATFORM_LIB_DIR}"
|
||||||
|
ARCHIVE DESTINATION "lib${wxPLATFORM_LIB_DIR}"
|
||||||
|
RUNTIME DESTINATION "lib${wxPLATFORM_LIB_DIR}"
|
||||||
|
BUNDLE DESTINATION Applications/wxWidgets
|
||||||
|
)
|
||||||
|
|
||||||
|
list(APPEND wxLIB_TARGETS ${name})
|
||||||
endif()
|
endif()
|
||||||
|
endmacro()
|
||||||
add_library(${name} ${wxBUILD_LIB_TYPE} ${src_files})
|
|
||||||
wx_set_target_properties(${name} ${wxADD_LIBRARY_IS_BASE})
|
|
||||||
|
|
||||||
# Setup install
|
|
||||||
wx_install(TARGETS ${name}
|
|
||||||
LIBRARY DESTINATION "lib${wxPLATFORM_LIB_DIR}"
|
|
||||||
ARCHIVE DESTINATION "lib${wxPLATFORM_LIB_DIR}"
|
|
||||||
RUNTIME DESTINATION "lib${wxPLATFORM_LIB_DIR}"
|
|
||||||
BUNDLE DESTINATION Applications/wxWidgets
|
|
||||||
)
|
|
||||||
|
|
||||||
set(wxLIB_TARGETS ${wxLIB_TARGETS} ${name} PARENT_SCOPE)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
# Enable cotire for target if precompiled headers are enabled
|
# Enable cotire for target if precompiled headers are enabled
|
||||||
macro(wx_target_enable_precomp target_name)
|
macro(wx_target_enable_precomp target_name)
|
||||||
@@ -336,13 +341,15 @@ endmacro()
|
|||||||
# Enable precompiled headers for wx libraries
|
# Enable precompiled headers for wx libraries
|
||||||
macro(wx_finalize_lib target_name)
|
macro(wx_finalize_lib target_name)
|
||||||
set(wxLIB_TARGETS ${wxLIB_TARGETS} PARENT_SCOPE)
|
set(wxLIB_TARGETS ${wxLIB_TARGETS} PARENT_SCOPE)
|
||||||
if(wxBUILD_PRECOMP AND TARGET ${target_name})
|
if(wxBUILD_PRECOMP)
|
||||||
target_compile_definitions(${target_name} PRIVATE WX_PRECOMP)
|
if(TARGET ${target_name})
|
||||||
set_target_properties(${target_name} PROPERTIES
|
target_compile_definitions(${target_name} PRIVATE WX_PRECOMP)
|
||||||
COTIRE_CXX_PREFIX_HEADER_INIT "${wxSOURCE_DIR}/include/wx/wxprec.h")
|
set_target_properties(${target_name} PROPERTIES
|
||||||
wx_target_enable_precomp(${target_name})
|
COTIRE_CXX_PREFIX_HEADER_INIT "${wxSOURCE_DIR}/include/wx/wxprec.h")
|
||||||
|
wx_target_enable_precomp(${target_name})
|
||||||
|
endif()
|
||||||
elseif(MSVC)
|
elseif(MSVC)
|
||||||
target_compile_definitions(${target_name} PRIVATE NOPCH)
|
wx_lib_compile_definitions(${target_name} PRIVATE NOPCH)
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
@@ -354,6 +361,8 @@ macro(wx_lib_link_libraries name)
|
|||||||
cmake_parse_arguments(_LIB_LINK "" "" "PUBLIC;PRIVATE" ${ARGN})
|
cmake_parse_arguments(_LIB_LINK "" "" "PUBLIC;PRIVATE" ${ARGN})
|
||||||
list(APPEND wxMONO_LIBS_PUBLIC ${_LIB_LINK_PUBLIC})
|
list(APPEND wxMONO_LIBS_PUBLIC ${_LIB_LINK_PUBLIC})
|
||||||
list(APPEND wxMONO_LIBS_PRIVATE ${_LIB_LINK_PRIVATE})
|
list(APPEND wxMONO_LIBS_PRIVATE ${_LIB_LINK_PRIVATE})
|
||||||
|
set(wxMONO_LIBS_PUBLIC ${wxMONO_LIBS_PUBLIC} PARENT_SCOPE)
|
||||||
|
set(wxMONO_LIBS_PRIVATE ${wxMONO_LIBS_PRIVATE} PARENT_SCOPE)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(${name};${ARGN})
|
target_link_libraries(${name};${ARGN})
|
||||||
endif()
|
endif()
|
||||||
@@ -377,6 +386,8 @@ macro(wx_lib_include_directories name)
|
|||||||
cmake_parse_arguments(_LIB_INCLUDE_DIRS "" "" "PUBLIC;PRIVATE" ${ARGN})
|
cmake_parse_arguments(_LIB_INCLUDE_DIRS "" "" "PUBLIC;PRIVATE" ${ARGN})
|
||||||
list(APPEND wxMONO_INCLUDE_DIRS_PUBLIC ${_LIB_INCLUDE_DIRS_PUBLIC})
|
list(APPEND wxMONO_INCLUDE_DIRS_PUBLIC ${_LIB_INCLUDE_DIRS_PUBLIC})
|
||||||
list(APPEND wxMONO_INCLUDE_DIRS_PRIVATE ${_LIB_INCLUDE_DIRS_PRIVATE})
|
list(APPEND wxMONO_INCLUDE_DIRS_PRIVATE ${_LIB_INCLUDE_DIRS_PRIVATE})
|
||||||
|
set(wxMONO_INCLUDE_DIRS_PUBLIC ${wxMONO_INCLUDE_DIRS_PUBLIC} PARENT_SCOPE)
|
||||||
|
set(wxMONO_INCLUDE_DIRS_PRIVATE ${wxMONO_INCLUDE_DIRS_PRIVATE} PARENT_SCOPE)
|
||||||
else()
|
else()
|
||||||
target_include_directories(${name};BEFORE;${ARGN})
|
target_include_directories(${name};BEFORE;${ARGN})
|
||||||
endif()
|
endif()
|
||||||
@@ -390,6 +401,8 @@ macro(wx_lib_compile_definitions name)
|
|||||||
cmake_parse_arguments(_LIB_DEFINITIONS "" "" "PUBLIC;PRIVATE" ${ARGN})
|
cmake_parse_arguments(_LIB_DEFINITIONS "" "" "PUBLIC;PRIVATE" ${ARGN})
|
||||||
list(APPEND wxMONO_DEFINITIONS_PUBLIC ${_LIB_DEFINITIONS_PUBLIC})
|
list(APPEND wxMONO_DEFINITIONS_PUBLIC ${_LIB_DEFINITIONS_PUBLIC})
|
||||||
list(APPEND wxMONO_DEFINITIONS_PRIVATE ${_LIB_DEFINITIONS_PRIVATE})
|
list(APPEND wxMONO_DEFINITIONS_PRIVATE ${_LIB_DEFINITIONS_PRIVATE})
|
||||||
|
set(wxMONO_DEFINITIONS_PUBLIC ${wxMONO_DEFINITIONS_PUBLIC} PARENT_SCOPE)
|
||||||
|
set(wxMONO_DEFINITIONS_PRIVATE ${wxMONO_DEFINITIONS_PRIVATE} PARENT_SCOPE)
|
||||||
else()
|
else()
|
||||||
target_compile_definitions(${name};${ARGN})
|
target_compile_definitions(${name};${ARGN})
|
||||||
endif()
|
endif()
|
||||||
|
@@ -17,6 +17,7 @@ if(wxBUILD_MONOLITHIC)
|
|||||||
set(wxMONO_LIBS_PUBLIC)
|
set(wxMONO_LIBS_PUBLIC)
|
||||||
set(wxMONO_INCLUDE_DIRS_PRIVATE)
|
set(wxMONO_INCLUDE_DIRS_PRIVATE)
|
||||||
set(wxMONO_INCLUDE_DIRS_PUBLIC)
|
set(wxMONO_INCLUDE_DIRS_PUBLIC)
|
||||||
|
set(wxMONO_NONCOMPILED_CPP_FILES)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Define third party libraries
|
# Define third party libraries
|
||||||
@@ -39,7 +40,6 @@ endmacro()
|
|||||||
# Define base libraries
|
# Define base libraries
|
||||||
set(LIBS base)
|
set(LIBS base)
|
||||||
add_opt_lib(net wxUSE_SOCKETS)
|
add_opt_lib(net wxUSE_SOCKETS)
|
||||||
add_opt_lib(xml wxUSE_XML)
|
|
||||||
|
|
||||||
# Define UI libraries
|
# Define UI libraries
|
||||||
if(wxUSE_GUI)
|
if(wxUSE_GUI)
|
||||||
@@ -62,6 +62,12 @@ if(wxUSE_GUI)
|
|||||||
add_opt_lib(qa wxUSE_DEBUGREPORT)
|
add_opt_lib(qa wxUSE_DEBUGREPORT)
|
||||||
endif() # wxUSE_GUI
|
endif() # wxUSE_GUI
|
||||||
|
|
||||||
|
# Include XML library last
|
||||||
|
# In the monolithic build, where all target properties (include dirs) from different targets are concatenated,
|
||||||
|
# wxml might include system expat, which might use Mono, which has it's own copy of png.
|
||||||
|
# Thus to ensure wx's core library includes the right png class, core must be processed first before xml
|
||||||
|
add_opt_lib(xml wxUSE_XML)
|
||||||
|
|
||||||
# Include cmake file for every library
|
# Include cmake file for every library
|
||||||
foreach(LIB ${LIBS})
|
foreach(LIB ${LIBS})
|
||||||
add_subdirectory(${LIB})
|
add_subdirectory(${LIB})
|
||||||
@@ -87,6 +93,10 @@ if(wxBUILD_MONOLITHIC)
|
|||||||
target_compile_definitions(mono ${vis} ${wxMONO_DEFINITIONS_${vis}})
|
target_compile_definitions(mono ${vis} ${wxMONO_DEFINITIONS_${vis}})
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
foreach(file ${wxMONO_NONCOMPILED_CPP_FILES})
|
||||||
|
set_source_files_properties(${file} PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||||
|
endforeach()
|
||||||
|
wx_finalize_lib(mono)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Propagate variable(s) to parent scope
|
# Propagate variable(s) to parent scope
|
||||||
|
@@ -194,7 +194,7 @@ class WXDLLIMPEXP_BASE wxConsoleAppTraitsBase : public wxAppTraits
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
#if !wxUSE_CONSOLE_EVENTLOOP
|
#if !wxUSE_CONSOLE_EVENTLOOP
|
||||||
virtual wxEventLoopBase *CreateEventLoop() { return NULL; }
|
virtual wxEventLoopBase *CreateEventLoop() wxOVERRIDE { return NULL; }
|
||||||
#endif // !wxUSE_CONSOLE_EVENTLOOP
|
#endif // !wxUSE_CONSOLE_EVENTLOOP
|
||||||
|
|
||||||
#if wxUSE_LOG
|
#if wxUSE_LOG
|
||||||
|
@@ -83,7 +83,10 @@ public:
|
|||||||
virtual void SetBrush(const wxBrush& brush) wxOVERRIDE;
|
virtual void SetBrush(const wxBrush& brush) wxOVERRIDE;
|
||||||
virtual void SetBackground(const wxBrush& brush) wxOVERRIDE;
|
virtual void SetBackground(const wxBrush& brush) wxOVERRIDE;
|
||||||
virtual void SetBackgroundMode(int mode) wxOVERRIDE;
|
virtual void SetBackgroundMode(int mode) wxOVERRIDE;
|
||||||
|
|
||||||
|
#if wxUSE_PALETTE
|
||||||
virtual void SetPalette(const wxPalette& palette) wxOVERRIDE;
|
virtual void SetPalette(const wxPalette& palette) wxOVERRIDE;
|
||||||
|
#endif
|
||||||
|
|
||||||
virtual void DestroyClippingRegion() wxOVERRIDE;
|
virtual void DestroyClippingRegion() wxOVERRIDE;
|
||||||
|
|
||||||
|
@@ -86,7 +86,10 @@ public:
|
|||||||
virtual void SetTextForeground( const wxColour &col ) wxOVERRIDE;
|
virtual void SetTextForeground( const wxColour &col ) wxOVERRIDE;
|
||||||
virtual void SetTextBackground( const wxColour &col ) wxOVERRIDE;
|
virtual void SetTextBackground( const wxColour &col ) wxOVERRIDE;
|
||||||
virtual void SetBackgroundMode( int mode ) wxOVERRIDE;
|
virtual void SetBackgroundMode( int mode ) wxOVERRIDE;
|
||||||
|
|
||||||
|
#if wxUSE_PALETTE
|
||||||
virtual void SetPalette( const wxPalette& palette ) wxOVERRIDE;
|
virtual void SetPalette( const wxPalette& palette ) wxOVERRIDE;
|
||||||
|
#endif
|
||||||
|
|
||||||
virtual void DestroyClippingRegion() wxOVERRIDE;
|
virtual void DestroyClippingRegion() wxOVERRIDE;
|
||||||
|
|
||||||
|
@@ -457,10 +457,12 @@ void* wxGCDCImpl::GetHandle() const
|
|||||||
return cgctx;
|
return cgctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_PALETTE
|
||||||
void wxGCDCImpl::SetPalette( const wxPalette& WXUNUSED(palette) )
|
void wxGCDCImpl::SetPalette( const wxPalette& WXUNUSED(palette) )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void wxGCDCImpl::SetBackgroundMode( int mode )
|
void wxGCDCImpl::SetBackgroundMode( int mode )
|
||||||
{
|
{
|
||||||
|
@@ -129,7 +129,7 @@ bool wxBMPHandler::SaveDib(wxImage *image,
|
|||||||
(format == wxBMP_8BPP_RED) || (format == wxBMP_8BPP_PALETTE) )
|
(format == wxBMP_8BPP_RED) || (format == wxBMP_8BPP_PALETTE) )
|
||||||
{
|
{
|
||||||
// need to set a wxPalette to use this, HOW TO CHECK IF VALID, SIZE?
|
// need to set a wxPalette to use this, HOW TO CHECK IF VALID, SIZE?
|
||||||
if ((format == wxBMP_8BPP_PALETTE)
|
if (format == wxBMP_8BPP_PALETTE
|
||||||
#if wxUSE_PALETTE
|
#if wxUSE_PALETTE
|
||||||
&& !image->HasPalette()
|
&& !image->HasPalette()
|
||||||
#endif // wxUSE_PALETTE
|
#endif // wxUSE_PALETTE
|
||||||
|
@@ -1863,10 +1863,12 @@ void wxWindowDCImpl::SetBackgroundMode( int mode )
|
|||||||
m_backgroundMode = mode;
|
m_backgroundMode = mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_PALETTE
|
||||||
void wxWindowDCImpl::SetPalette( const wxPalette& WXUNUSED(palette) )
|
void wxWindowDCImpl::SetPalette( const wxPalette& WXUNUSED(palette) )
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( wxT("wxWindowDCImpl::SetPalette not implemented") );
|
wxFAIL_MSG( wxT("wxWindowDCImpl::SetPalette not implemented") );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void wxWindowDCImpl::UpdateClipBox()
|
void wxWindowDCImpl::UpdateClipBox()
|
||||||
{
|
{
|
||||||
|
@@ -24,6 +24,8 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "wx/msw/wrapwin.h"
|
||||||
|
|
||||||
#if wxUSE_DISPLAY
|
#if wxUSE_DISPLAY
|
||||||
|
|
||||||
#include "wx/display.h"
|
#include "wx/display.h"
|
||||||
@@ -38,7 +40,6 @@
|
|||||||
#include "wx/sysopt.h"
|
#include "wx/sysopt.h"
|
||||||
|
|
||||||
#include "wx/display_impl.h"
|
#include "wx/display_impl.h"
|
||||||
#include "wx/msw/wrapwin.h"
|
|
||||||
#include "wx/msw/missing.h"
|
#include "wx/msw/missing.h"
|
||||||
#include "wx/msw/private.h"
|
#include "wx/msw/private.h"
|
||||||
#include "wx/msw/private/hiddenwin.h"
|
#include "wx/msw/private/hiddenwin.h"
|
||||||
|
@@ -159,6 +159,7 @@ wxString wxGetOsDescription()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
|
#if wxUSE_DATETIME
|
||||||
bool wxDateTime::GetFirstWeekDay(wxDateTime::WeekDay *firstDay)
|
bool wxDateTime::GetFirstWeekDay(wxDateTime::WeekDay *firstDay)
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( firstDay, false, wxS("output parameter must be non-null") );
|
wxCHECK_MSG( firstDay, false, wxS("output parameter must be non-null") );
|
||||||
@@ -169,3 +170,4 @@ bool wxDateTime::GetFirstWeekDay(wxDateTime::WeekDay *firstDay)
|
|||||||
*firstDay = wxDateTime::WeekDay(([calendar firstWeekday] - 1) % 7);
|
*firstDay = wxDateTime::WeekDay(([calendar firstWeekday] - 1) % 7);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif // wxUSE_DATETIME
|
||||||
|
Reference in New Issue
Block a user