Commit 07781d34 authored by Maciej Sumiński's avatar Maciej Sumiński
Browse files

Removed KICAD_GAL CMake option.

parent b5aadfc3
Loading
Loading
Loading
Loading
+0 −10
Original line number Original line Diff line number Diff line
@@ -51,10 +51,6 @@ option(KICAD_SCRIPTING_WXPYTHON
    "set this option ON to build wxpython implementation for wx interface building in python and py.shell"
    "set this option ON to build wxpython implementation for wx interface building in python and py.shell"
    )
    )
    
    
option(KICAD_GAL
    "set this option ON to build KICAD using Graphics Abstraction Layer as a rendering backend"
    )

# when option KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES is enabled:
# when option KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES is enabled:
# PYTHON_EXECUTABLE can be defined when invoking cmake
# PYTHON_EXECUTABLE can be defined when invoking cmake
# ( use -DPYTHON_EXECUTABLE=<python path>/python.exe or python2 )
# ( use -DPYTHON_EXECUTABLE=<python path>/python.exe or python2 )
@@ -187,10 +183,6 @@ if(USE_WX_GRAPHICS_CONTEXT)
    add_definitions(-DUSE_WX_GRAPHICS_CONTEXT)
    add_definitions(-DUSE_WX_GRAPHICS_CONTEXT)
endif()
endif()


if(KICAD_GAL)
    add_definitions(-DKICAD_GAL)
endif()

# Allow user to override the default settings for adding images to menu items.  By default
# Allow user to override the default settings for adding images to menu items.  By default
# images in menu items are enabled on all platforms except OSX.  This can be over ridden by
# images in menu items are enabled on all platforms except OSX.  This can be over ridden by
# defining -DUSE_IMAGES_IN_MENUS=ON/OFF to force the preferred behavior.
# defining -DUSE_IMAGES_IN_MENUS=ON/OFF to force the preferred behavior.
@@ -265,7 +257,6 @@ add_definitions(-DWX_COMPATIBILITY)
find_package(OpenGL QUIET)
find_package(OpenGL QUIET)
check_find_package_result(OPENGL_FOUND "OpenGL")
check_find_package_result(OPENGL_FOUND "OpenGL")


if(KICAD_GAL)
#####################
#####################
# Find GLEW library #
# Find GLEW library #
#####################
#####################
@@ -277,7 +268,6 @@ check_find_package_result(GLEW_FOUND "GLEW")
######################
######################
find_package(Cairo 1.8.1 QUIET)
find_package(Cairo 1.8.1 QUIET)
check_find_package_result(CAIRO_FOUND "Cairo")
check_find_package_result(CAIRO_FOUND "Cairo")
endif(KICAD_GAL)


##########################
##########################
# Download Boost library #
# Download Boost library #
+0 −6
Original line number Original line Diff line number Diff line
@@ -11,7 +11,6 @@ include_directories(
    ${INC_AFTER}
    ${INC_AFTER}
    )
    )


if(KICAD_GAL)
# Generate files containing shader programs
# Generate files containing shader programs
add_custom_command (
add_custom_command (
    OUTPUT gal/opengl/shader_src.h
    OUTPUT gal/opengl/shader_src.h
@@ -46,7 +45,6 @@ add_dependencies(gal ShaderHeader)
if(WIN32)
if(WIN32)
add_definitions(-DGLEW_STATIC)
add_definitions(-DGLEW_STATIC)
endif(WIN32)
endif(WIN32)
endif(KICAD_GAL)


set(COMMON_ABOUT_DLG_SRCS
set(COMMON_ABOUT_DLG_SRCS
    dialog_about/AboutDialog_main.cpp
    dialog_about/AboutDialog_main.cpp
@@ -129,13 +127,11 @@ set(COMMON_SRCS
    zoom.cpp
    zoom.cpp
    )
    )


if(KICAD_GAL)
set(COMMON_SRCS
set(COMMON_SRCS
	${COMMON_SRCS}
	${COMMON_SRCS}
	view/view.cpp
	view/view.cpp
	view/view_item.cpp
	view/view_item.cpp
    )
    )
endif(KICAD_GAL)


add_library(common STATIC ${COMMON_SRCS})
add_library(common STATIC ${COMMON_SRCS})


@@ -188,12 +184,10 @@ set(PCB_COMMON_SRCS
    fp_lib_table.cpp
    fp_lib_table.cpp
)
)


if(KICAD_GAL)
set(PCB_COMMON_SRCS
set(PCB_COMMON_SRCS
    ${PCB_COMMON_SRCS} 
    ${PCB_COMMON_SRCS} 
    ../pcbnew/pcb_painter.cpp
    ../pcbnew/pcb_painter.cpp
    )
    )
endif(KICAD_GAL)


# add -DPCBNEW to compilation of these PCBNEW sources
# add -DPCBNEW to compilation of these PCBNEW sources
set_source_files_properties( ${PCB_COMMON_SRCS} PROPERTIES
set_source_files_properties( ${PCB_COMMON_SRCS} PROPERTIES
+1 −8
Original line number Original line Diff line number Diff line
@@ -46,10 +46,8 @@
#include <math/box2.h>
#include <math/box2.h>


#include <wx/fontdlg.h>
#include <wx/fontdlg.h>
#ifdef KICAD_GAL
#include <view/view.h>
#include <view/view.h>
#include <gal/graphics_abstraction_layer.h>
#include <gal/graphics_abstraction_layer.h>
#endif /* KICAD_GAL */


/**
/**
 * Definition for enabling and disabling scroll bar setting trace output.  See the
 * Definition for enabling and disabling scroll bar setting trace output.  See the
@@ -236,14 +234,12 @@ void EDA_DRAW_FRAME::SkipNextLeftButtonReleaseEvent()
void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent )
void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent )
{
{
    SetGridVisibility( !IsGridVisible() );
    SetGridVisibility( !IsGridVisible() );
#ifdef KICAD_GAL
    if( m_galCanvasActive )
    if( m_galCanvasActive )
    {
    {
        m_galCanvas->GetGAL()->SetGridVisibility( IsGridVisible() );
        m_galCanvas->GetGAL()->SetGridVisibility( IsGridVisible() );
        m_galCanvas->Refresh();
        m_galCanvas->Refresh();
    }
    }
    else
    else
#endif /* KICAD_GAL */
        m_canvas->Refresh();
        m_canvas->Refresh();
}
}


@@ -396,13 +392,12 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event )
    m_LastGridSizeId = id - ID_POPUP_GRID_LEVEL_1000;
    m_LastGridSizeId = id - ID_POPUP_GRID_LEVEL_1000;
    screen->SetGrid( id );
    screen->SetGrid( id );
    screen->SetCrossHairPosition( screen->RefPos( true ) );
    screen->SetCrossHairPosition( screen->RefPos( true ) );
#ifdef KICAD_GAL

    if( m_galCanvasActive )
    if( m_galCanvasActive )
    {
    {
        KiGfx::GAL* gal = m_galCanvas->GetGAL();
        KiGfx::GAL* gal = m_galCanvas->GetGAL();
        gal->SetGridSize( VECTOR2D( screen->GetGrid().m_Size ) );
        gal->SetGridSize( VECTOR2D( screen->GetGrid().m_Size ) );
    }
    }
#endif /* KICAD_GAL */


    Refresh();
    Refresh();
}
}
@@ -957,7 +952,6 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )


void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
{
{
#ifdef KICAD_GAL
    KiGfx::VIEW* view = m_galCanvas->GetView();
    KiGfx::VIEW* view = m_galCanvas->GetView();
    KiGfx::GAL* gal = m_galCanvas->GetGAL();
    KiGfx::GAL* gal = m_galCanvas->GetGAL();


@@ -1010,5 +1004,4 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable )
    m_auimgr.Update();
    m_auimgr.Update();


    m_galCanvasActive = aEnable;
    m_galCanvasActive = aEnable;
#endif /* KICAD_GAL */
}
}
+0 −2
Original line number Original line Diff line number Diff line
@@ -84,9 +84,7 @@ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer )
    if( screen->m_FirstRedraw )
    if( screen->m_FirstRedraw )
        screen->SetCrossHairPosition( screen->GetScrollCenterPosition() );
        screen->SetCrossHairPosition( screen->GetScrollCenterPosition() );


#ifdef KICAD_GAL
    if( !m_galCanvasActive )
    if( !m_galCanvasActive )
#endif /* KICAD_GAL */
        RedrawScreen( screen->GetScrollCenterPosition(), aWarpPointer );
        RedrawScreen( screen->GetScrollCenterPosition(), aWarpPointer );
}
}


+0 −2
Original line number Original line Diff line number Diff line
@@ -99,7 +99,6 @@ target_link_libraries(cvpcb
    ${GDI_PLUS_LIBRARIES}
    ${GDI_PLUS_LIBRARIES}
    )
    )


if(KICAD_GAL)
target_link_libraries(cvpcb
target_link_libraries(cvpcb
	gal
	gal
	${GLEW_LIBRARIES}
	${GLEW_LIBRARIES}
@@ -116,7 +115,6 @@ target_link_libraries(cvpcb
	bz2
	bz2
	)
	)
endif(WIN32)
endif(WIN32)
endif(KICAD_GAL)


###
###
# Add cvpcb as install target
# Add cvpcb as install target
Loading