Commit c00533a1 authored by Maciej Suminski's avatar Maciej Suminski
Browse files

Merged kicad-gal

parents d4d80120 32e962e8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
include/boost
boost_root
.downloads-by-cmake
common/netlist_keywords.*
common/netlist_lexer.h
+0 −1
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@ add_definitions(-DPCBNEW)

include_directories(BEFORE ${INC_BEFORE})
include_directories(
    ${Boost_INCLUDE_DIR}
    ../pcbnew
    ../polygon
    ${INC_AFTER}
+209 −206
Original line number Diff line number Diff line
@@ -14,9 +14,6 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
# reports.
#

option(USE_PCBNEW_NANOMETRES
    "Use nanometers for Pcbnew internal units instead of deci-mils (default ON)." ON)

# Russian GOST patch
option( wxUSE_UNICODE "enable/disable building unicode ( default OFF)" )
option( KICAD_GOST "enable/disable building using GOST notation for multiple gates per package ( default OFF)" )
@@ -35,10 +32,6 @@ option(KICAD_STABLE_VERSION
    "set this option to ON to build the stable version of KICAD. mainly used to set version ID (default OFF)"
    )

option(KICAD_TESTING_VERSION
    "set this option to ON to build the testing version of KICAD. mainly used to set version ID (default OFF)"
    )

option( KICAD_SCRIPTING
    "set this option ON to build the scripting support inside kicad binaries"
    )
@@ -60,18 +53,14 @@ option(KICAD_SCRIPTING_WXPYTHON

option( USE_FP_LIB_TABLE "Use the new footprint library table implementation. ( default OFF)" )

#option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." OFF )


#Set version option (stable or testing)

if(KICAD_STABLE_VERSION AND KICAD_TESTING_VERSION )
    message(FATAL_ERROR "Only one KiCad build version option KICAD_TESTING_VERSION or KICAD_STABLE_VERSION can be set to ON")
elseif(NOT KICAD_STABLE_VERSION AND NOT KICAD_TESTING_VERSION)
    message(FATAL_ERROR "Either KiCad build version option KICAD_TESTING_VERSION or KICAD_STABLE_VERSION must be set to ON")
elseif(KICAD_STABLE_VERSION)
if( KICAD_STABLE_VERSION)
    add_definitions( -DKICAD_STABLE_VERSION )
    message( "Build stable version of KiCad")
else()
    add_definitions(-DKICAD_TESTING_VERSION)
    message("Build testing (unstable) version of KiCad")
    message( STATUS "Building stable version of KiCad" )
endif()

# All CMake downloads go here.  Suggested is up in the source tree, not in the build dir where they
@@ -277,9 +266,8 @@ check_find_package_result(GLEW_FOUND "GLEW")
find_package(Cairo 1.8.1 QUIET)
check_find_package_result(CAIRO_FOUND "Cairo")

##########################
# Download Boost library #
##########################
# Download boost and possibly build parts of it
#################################################
include( download_boost )


@@ -315,6 +303,27 @@ if(MINGW AND USE_WX_GRAPHICS_CONTEXT)
    check_find_package_result( GDI_PLUS_FOUND "GDI+" )
endif()

# Assist with header file searching optimization:
# INC_BEFORE and INC_AFTER are two lists which go at the front and back of the
# header file search lists, respectively.
# INC_BEFORE is for use with "include_directories( BEFORE ...)", which _reverses_
# the order during insertion.  (So put first wanted last, which is
# ${CMAKE_SOURCE_DIR/include.)  Use '.' for current source dir since
# we don't want expansion here and now, which would happen if using ${CMAKE_CURRENT_SOURCE_DIR}.
# Instead we use '.' which is applicable to any source directory below here as a result of
# this lack of expansion.
set( INC_BEFORE
    .
    ${CMAKE_SOURCE_DIR}/include
    )

set( INC_AFTER
    ${Boost_INCLUDE_DIR}
    #include <config.h>
    ${CMAKE_BINARY_DIR}
    )


# Find Python and other scripting resources
if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
    set( PythonInterp_FIND_VERSION )
@@ -337,11 +346,19 @@ if(KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)
    set( PYTHON_DEST "${PYTHON_SITE_PACKAGE_PATH}" CACHE PATH "Python module install path." )
    mark_as_advanced( PYTHON_DEST )
    message( STATUS "Python module install path: ${PYTHON_DEST}" )

    find_package( PythonLibs )
    include_directories(${PYTHON_INCLUDE_PATH}
                        ./scripting)
endif(KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES)

    #message( STATUS "PYTHON_INCLUDE_DIRS:${PYTHON_INCLUDE_DIRS}" )

    # Infrequently needed headers go at end of search paths, append to INC_AFTER which
    # although is used for all components, should be a harmless hit for something like eeschema
    # so long as unused search paths are at the end like this.
    set( INC_AFTER ${INC_AFTER} ${PYTHON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/scripting )

    #message( STATUS "/ INC_AFTER:${INC_AFTER}" )

endif()


# Automagically create version header file.
@@ -356,20 +373,6 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/include/config.h)
    add_definitions( -DHAVE_SVN_REVISION )
endif()

# For include_directories(BEFORE ...), which _reverses_
# the order during insertion, so put first wanted last, which is
# ${CMAKE_SOURCE_DIR/include.  Use '.' for current source dir since
# we don't want expansion here and now, and don't need expansion of
# ${CMAKE_CURRENT_SOURCE_DIR}, '.' will work for any source directory.
set(INC_BEFORE
    .
    ${CMAKE_SOURCE_DIR}/include
    )

set(INC_AFTER
    #include <config.h>
    ${CMAKE_BINARY_DIR}
    )

#================================================
# Let CMake look in these directories for nested
@@ -388,7 +391,6 @@ add_subdirectory(eeschema)
add_subdirectory( gerbview )
add_subdirectory( kicad )
add_subdirectory( pcbnew )
add_subdirectory(pcbnew/pcad2kicadpcb_plugin)
add_subdirectory( polygon )
add_subdirectory( pagelayout_editor )
add_subdirectory( potrace )
@@ -399,10 +401,11 @@ add_subdirectory(tools)


# Make all libs and executables depend on ExternalProject_Add( boost ),
# except perhaps bitmap lib
# except perhaps bitmap lib.  This allows a multi-threaded build to succeed.
add_dependencies( pcbnew boost )
add_dependencies( eeschema boost )
add_dependencies( cvpcb boost )
add_dependencies( gal boost )
add_dependencies( common boost )
add_dependencies( pcbcommon boost )
add_dependencies( 3d-viewer boost )
+32 −0
Original line number Diff line number Diff line
# - helper module to find OSX frameworks

#=============================================================================
# Copyright 2003-2009 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
#  License text for the above reference.)

if(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)
  set(CMAKE_FIND_FRAMEWORKS_INCLUDED 1)
  macro(CMAKE_FIND_FRAMEWORKS fwk)
    set(${fwk}_FRAMEWORKS)
    if(APPLE)
      foreach(dir
          ~/Library/Frameworks/${fwk}.framework
          /Library/Frameworks/${fwk}.framework
          /System/Library/Frameworks/${fwk}.framework
          /Network/Library/Frameworks/${fwk}.framework)
        if(EXISTS ${dir})
          set(${fwk}_FRAMEWORKS ${${fwk}_FRAMEWORKS} ${dir})
        endif()
      endforeach()
    endif()
  endmacro()
endif()
+7 −3
Original line number Diff line number Diff line
@@ -42,12 +42,16 @@ ELSE (WIN32)

  IF (APPLE)
# These values for Apple could probably do with improvement.
    FIND_PATH( GLEW_INCLUDE_DIR glew.h
    FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
      /System/Library/Frameworks/GLEW.framework/Versions/A/Headers
      /opt/local/include
      ${OPENGL_LIBRARY_DIR}
    )
    SET(GLEW_GLEW_LIBRARY "-framework GLEW" CACHE STRING "GLEW library for OSX")
    SET(GLEW_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")

    FIND_LIBRARY( GLEW_GLEW_LIBRARY GLEW
      /opt/local/lib
    )

  ELSE (APPLE)

    FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h
Loading