Removed dependency on wxWidgets from Alien.
Updated source code to wxWidgets 3.1.1 Moved invocation of perl unit / integration tests to the xs project.
This commit is contained in:
parent
cc3572f3ce
commit
6003005812
@ -175,33 +175,6 @@ endif()
|
|||||||
# The Intel TBB library will use the std::exception_ptr feature of C++11.
|
# The Intel TBB library will use the std::exception_ptr feature of C++11.
|
||||||
add_definitions(-DTBB_USE_CAPTURED_EXCEPTION=0)
|
add_definitions(-DTBB_USE_CAPTURED_EXCEPTION=0)
|
||||||
|
|
||||||
# Find and configure wxWidgets
|
|
||||||
if (SLIC3R_PRUSACONTROL)
|
|
||||||
set(wxWidgets_UseAlienWx 1)
|
|
||||||
if (wxWidgets_UseAlienWx)
|
|
||||||
set(AlienWx_DEBUG 1)
|
|
||||||
find_package(AlienWx REQUIRED COMPONENTS base core adv html gl)
|
|
||||||
include_directories(${AlienWx_INCLUDE_DIRS})
|
|
||||||
#add_compile_options(${AlienWx_CXX_FLAGS})
|
|
||||||
add_definitions(${AlienWx_DEFINITIONS})
|
|
||||||
set(wxWidgets_LIBRARIES ${AlienWx_LIBRARIES})
|
|
||||||
# On Linux / gtk, we need to have a direct access to gtk+ for some workarounds.
|
|
||||||
if (AlienWx_GUI_TOOLKIT STREQUAL "gtk2")
|
|
||||||
pkg_check_modules(GTK2 gtk+-2.0)
|
|
||||||
include_directories(${GTK2_INCLUDE_DIRS})
|
|
||||||
endif()
|
|
||||||
if (AlienWx_GUI_TOOLKIT STREQUAL "gtk3")
|
|
||||||
pkg_check_modules(GTK3 gtk+-3.0)
|
|
||||||
include_directories(${GTK3_INCLUDE_DIRS})
|
|
||||||
endif()
|
|
||||||
else ()
|
|
||||||
find_package(wxWidgets REQUIRED COMPONENTS base core adv html gl)
|
|
||||||
include(${wxWidgets_USE_FILE})
|
|
||||||
endif ()
|
|
||||||
#FIXME rewrite the PRUS format to miniz!
|
|
||||||
# add_definitions(-DSLIC3R_GUI -DSLIC3R_PRUS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(CURL REQUIRED)
|
find_package(CURL REQUIRED)
|
||||||
include_directories(${CURL_INCLUDE_DIRS})
|
include_directories(${CURL_INCLUDE_DIRS})
|
||||||
|
|
||||||
@ -270,22 +243,9 @@ add_subdirectory(resources/localization)
|
|||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
# Perl bindings, currently only used for the unit / integration tests of libslic3r.
|
# Perl bindings, currently only used for the unit / integration tests of libslic3r.
|
||||||
|
# Also runs the unit / integration tests.
|
||||||
|
#FIXME Port the tests into C++ to finally get rid of the Perl!
|
||||||
add_subdirectory(xs)
|
add_subdirectory(xs)
|
||||||
|
|
||||||
get_filename_component(PERL_BIN_PATH "${PERL_EXECUTABLE}" DIRECTORY)
|
|
||||||
if (MSVC)
|
|
||||||
# By default the startup project in MSVC is the 'ALL_BUILD' cmake-created project,
|
|
||||||
# but we want 'slic3r' as the startup one because debugging run command is associated with it.
|
|
||||||
# (Unfortunatelly it cannot be associated with ALL_BUILD using CMake.)
|
|
||||||
# Note: For some reason this needs to be set in the top-level CMakeLists.txt
|
|
||||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT XS)
|
|
||||||
set(PERL_PROVE "${PERL_BIN_PATH}/prove.bat")
|
|
||||||
else ()
|
|
||||||
set(PERL_PROVE "${PERL_BIN_PATH}/prove")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
add_test (NAME xs COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} -I ${PROJECT_SOURCE_DIR}/local-lib/lib/perl5 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/xs)
|
|
||||||
add_test (NAME integration COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
|
|
||||||
|
|
||||||
file(GLOB MyVar var/*.png)
|
file(GLOB MyVar var/*.png)
|
||||||
install(FILES ${MyVar} DESTINATION share/slic3r-prusa3d)
|
install(FILES ${MyVar} DESTINATION share/slic3r-prusa3d)
|
||||||
|
@ -64,6 +64,9 @@ endif ()
|
|||||||
|
|
||||||
# Add the Slic3r GUI library, libcurl, OpenGL and GLU libraries.
|
# Add the Slic3r GUI library, libcurl, OpenGL and GLU libraries.
|
||||||
if (SLIC3R_GUI)
|
if (SLIC3R_GUI)
|
||||||
|
find_package(wxWidgets REQUIRED COMPONENTS base core adv html gl)
|
||||||
|
include(${wxWidgets_USE_FILE})
|
||||||
|
|
||||||
target_link_libraries(slic3r libslic3r_gui ${wxWidgets_LIBRARIES} ${CURL_LIBRARIES})
|
target_link_libraries(slic3r libslic3r_gui ${wxWidgets_LIBRARIES} ${CURL_LIBRARIES})
|
||||||
|
|
||||||
# Configure libcurl & OpenSSL
|
# Configure libcurl & OpenSSL
|
||||||
|
@ -1008,7 +1008,7 @@ void get_settings_choice(wxMenu *menu, int id, bool is_part)
|
|||||||
if (!settings_list)
|
if (!settings_list)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (wxGetMultipleChoices(selections, _(L("Select showing settings")), category_name, names) ==0 )
|
if (wxGetSelectedChoices(selections, _(L("Select showing settings")), category_name, names) == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::vector <std::string> selected_options;
|
std::vector <std::string> selected_options;
|
||||||
|
@ -2645,7 +2645,7 @@ void Tab::update_presetsctrl(wxDataViewTreeCtrl* ui, bool show_incompatible)
|
|||||||
wxDataViewTreeStoreContainerNode *node = ui->GetStore()->FindContainerNode(root_sys);
|
wxDataViewTreeStoreContainerNode *node = ui->GetStore()->FindContainerNode(root_sys);
|
||||||
if (node)
|
if (node)
|
||||||
{
|
{
|
||||||
wxDataViewTreeStoreNodeList::iterator iter;
|
wxDataViewTreeStoreNodes::iterator iter;
|
||||||
for (iter = node->GetChildren().begin(); iter != node->GetChildren().end(); iter++)
|
for (iter = node->GetChildren().begin(); iter != node->GetChildren().end(); iter++)
|
||||||
{
|
{
|
||||||
wxDataViewTreeStoreNode* child = *iter;
|
wxDataViewTreeStoreNode* child = *iter;
|
||||||
@ -2731,7 +2731,7 @@ void Tab::update_tab_presets(wxComboCtrl* ui, bool show_incompatible)
|
|||||||
wxDataViewTreeStoreContainerNode *node = popup->GetStore()->FindContainerNode(root_sys);
|
wxDataViewTreeStoreContainerNode *node = popup->GetStore()->FindContainerNode(root_sys);
|
||||||
if (node)
|
if (node)
|
||||||
{
|
{
|
||||||
wxDataViewTreeStoreNodeList::iterator iter;
|
wxDataViewTreeStoreNodes::iterator iter;
|
||||||
for (iter = node->GetChildren().begin(); iter != node->GetChildren().end(); iter++)
|
for (iter = node->GetChildren().begin(); iter != node->GetChildren().end(); iter++)
|
||||||
{
|
{
|
||||||
wxDataViewTreeStoreNode* child = *iter;
|
wxDataViewTreeStoreNode* child = *iter;
|
||||||
|
@ -111,6 +111,7 @@ class PrusaCollapsiblePaneMSW : public PrusaCollapsiblePane//wxCollapsiblePane
|
|||||||
wxButton* m_pDisclosureTriangleButton = nullptr;
|
wxButton* m_pDisclosureTriangleButton = nullptr;
|
||||||
wxBitmap m_bmp_close;
|
wxBitmap m_bmp_close;
|
||||||
wxBitmap m_bmp_open;
|
wxBitmap m_bmp_open;
|
||||||
|
wxString m_strLabel;
|
||||||
public:
|
public:
|
||||||
PrusaCollapsiblePaneMSW() {}
|
PrusaCollapsiblePaneMSW() {}
|
||||||
PrusaCollapsiblePaneMSW( wxWindow *parent,
|
PrusaCollapsiblePaneMSW( wxWindow *parent,
|
||||||
|
@ -185,3 +185,19 @@ endif()
|
|||||||
# Installation
|
# Installation
|
||||||
install(TARGETS XS DESTINATION ${PERL_VENDORARCH}/auto/Slic3r/XS)
|
install(TARGETS XS DESTINATION ${PERL_VENDORARCH}/auto/Slic3r/XS)
|
||||||
install(FILES lib/Slic3r/XS.pm DESTINATION ${PERL_VENDORLIB}/Slic3r)
|
install(FILES lib/Slic3r/XS.pm DESTINATION ${PERL_VENDORLIB}/Slic3r)
|
||||||
|
|
||||||
|
# Unit / integration tests
|
||||||
|
enable_testing()
|
||||||
|
get_filename_component(PERL_BIN_PATH "${PERL_EXECUTABLE}" DIRECTORY)
|
||||||
|
if (MSVC)
|
||||||
|
# By default the startup project in MSVC is the 'ALL_BUILD' cmake-created project,
|
||||||
|
# but we want 'slic3r' as the startup one because debugging run command is associated with it.
|
||||||
|
# (Unfortunatelly it cannot be associated with ALL_BUILD using CMake.)
|
||||||
|
# Note: For some reason this needs to be set in the top-level CMakeLists.txt
|
||||||
|
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT XS)
|
||||||
|
set(PERL_PROVE "${PERL_BIN_PATH}/prove.bat")
|
||||||
|
else ()
|
||||||
|
set(PERL_PROVE "${PERL_BIN_PATH}/prove")
|
||||||
|
endif ()
|
||||||
|
add_test (NAME xs COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} -I ${PROJECT_SOURCE_DIR}/local-lib/lib/perl5 WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
|
||||||
|
add_test (NAME integration COMMAND "${PERL_EXECUTABLE}" ${PERL_PROVE} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/..)
|
||||||
|
Loading…
Reference in New Issue
Block a user