Commit 422ffdab authored by f3nix's avatar f3nix

CMake:

* Require CMake version 2.6.1 on Windows and version 2.6.0 for other systems.
* Update FindSubversion to version from CMake 2.6.1 (localization issue solved).
* Remove FindwxWidgetsCVS and use the default one (some issues solved upstream).
* Formatting style changes.
parent bbc4c569
add_definitions(-DPCBNEW)
include_directories(
../pcbnew
../polygon)
include_directories(../pcbnew
../polygon)
set(3D-VIEWER_SRCS
3d_aux.cpp
......
project(kicad)
if(NOT APPLE)
cmake_minimum_required(VERSION 2.4.6 FATAL_ERROR)
else(NOT APPLE)
if(WIN32)
cmake_minimum_required(VERSION 2.6.1 FATAL_ERROR)
else(WIN32)
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
endif(NOT APPLE)
endif(WIN32)
# Path to local CMake modules.
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
......@@ -23,7 +23,6 @@ option(KICAD_MINIZIP "enable/disable building minizip (default ON)" ON)
#================================================
if(CMAKE_COMPILER_IS_GNUCXX)
# Set default flags for Release build.
set(CMAKE_C_FLAGS_RELEASE "-Wall -O2 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O2 -DNDEBUG")
......@@ -32,7 +31,6 @@ if(CMAKE_COMPILER_IS_GNUCXX)
# Set default flags for Debug build.
set(CMAKE_C_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG")
endif(CMAKE_COMPILER_IS_GNUCXX)
# Locations for install targets.
......@@ -51,21 +49,25 @@ endif(UNIX)
if(WIN32)
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.
set(CMAKE_INSTALL_PREFIX c:/kicad CACHE PATH "")
set(CMAKE_INSTALL_PREFIX c:/kicad
CACHE PATH "")
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
set(KICAD_PLUGINS ${KICAD_BIN}/plugins CACHE PATH "Location of KiCad plugins.")
set(KICAD_DATA share CACHE PATH "Location of KiCad data files.")
set(KICAD_DOCS doc CACHE PATH "Location of KiCad documentation files.")
set(KICAD_PLUGINS ${KICAD_BIN}/plugins
CACHE PATH "Location of KiCad plugins.")
set(KICAD_DATA share
CACHE PATH "Location of KiCad data files.")
set(KICAD_DOCS doc
CACHE PATH "Location of KiCad documentation files.")
endif(WIN32)
set(KICAD_DEMOS ${KICAD_DATA}/demos
set(KICAD_DEMOS ${KICAD_DATA}/demos
CACHE PATH "Location of KiCad demo files.")
set(KICAD_INTERNAT ${KICAD_DATA}/internat
set(KICAD_INTERNAT ${KICAD_DATA}/internat
CACHE PATH "Location of KiCad i18n files.")
set(KICAD_TEMPLATE ${KICAD_DATA}/template
CACHE PATH "Location of KiCad template files.")
mark_as_advanced(KICAD_BIN
mark_as_advanced(KICAD_BIN
KICAD_PLUGINS
KICAD_DATA
KICAD_DOCS
......@@ -83,13 +85,13 @@ include(CheckFindPackageResult)
#######################
# Find OpenGL library #
#######################
find_package(OpenGL)
find_package(OpenGL QUIET)
check_find_package_result(OPENGL_FOUND "OpenGL")
######################
# Find Boost library #
######################
find_package(Boost)
find_package(Boost QUIET)
check_find_package_result(Boost_FOUND "Boost")
##########################
......@@ -98,8 +100,7 @@ check_find_package_result(Boost_FOUND "Boost")
# Here you can define what libraries of wxWidgets you need for your
# application. You can figure out what libraries you need here;
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
set(wxWidgets_USE_LIBS base core adv gl html net)
find_package(wxWidgetsCVS)
find_package(wxWidgets COMPONENTS base core adv gl html net QUIET)
check_find_package_result(wxWidgets_FOUND "wxWidgets")
......@@ -113,16 +114,16 @@ include(MinGWResourceCompiler)
# Automagically create version header file.
# does not work with mingw for me (jpc)
if(UNIX)
include(CreateSVNVersionHeader)
create_svn_version_header()
include(CreateSVNVersionHeader)
create_svn_version_header()
endif(UNIX)
if(EXISTS ${CMAKE_SOURCE_DIR}/include/config.h)
# This file may exist (created by an alternate process to the svn test above),
# e.g. could be created by a checkout script that produces a source tar file.
# This directive means the about box will have the svn date & revision in it,
# but the hard coded release date (program version) will be preserved.
add_definitions(-DHAVE_SVN_REVISION)
# This file may exist (created by an alternate process to the svn test above),
# e.g. could be created by a checkout script that produces a source tar file.
# This directive means the about box will have the svn date & revision in it,
# but the hard coded release date (program version) will be preserved.
add_definitions(-DHAVE_SVN_REVISION)
endif(EXISTS ${CMAKE_SOURCE_DIR}/include/config.h)
......@@ -164,21 +165,20 @@ add_subdirectory(template)
#================================================
# Installation parameters
#================================================
install(FILES install.txt
install(FILES install.txt
DESTINATION ${KICAD_DOCS}
COMPONENT resources)
install(FILES freeroute.jnlp
install(FILES freeroute.jnlp
DESTINATION ${KICAD_BIN}
COMPONENT resources)
if(UNIX)
# set resource dir variables
#set(KICAD_PROGRAM_ICONS ${CMAKE_INSTALL_PREFIX}/share/kicad/icons)
set(LINUX_RESOURCES_DIR resources/linux)
set(LINUX_DESKTOP_FILES ${LINUX_RESOURCES_DIR}/opendesktop)
set(LINUX_DESKTOP_ICONS ${LINUX_RESOURCES_DIR}/icons)
# set resource dir variables
#set(KICAD_PROGRAM_ICONS ${CMAKE_INSTALL_PREFIX}/share/kicad/icons)
set(LINUX_RESOURCES_DIR resources/linux)
set(LINUX_DESKTOP_FILES ${LINUX_RESOURCES_DIR}/opendesktop)
set(LINUX_DESKTOP_ICONS ${LINUX_RESOURCES_DIR}/icons)
# Install program icons
......@@ -236,5 +236,4 @@ if(UNIX)
install(FILES ${LINUX_DESKTOP_ICONS}/kicad_pcbnew.png
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps
COMPONENT resources)
endif(UNIX)
macro(create_svn_version_header)
# Include Subversion support to automagically create version header file.
find_package(SubversionCVS)
find_package(Subversion)
if(Subversion_FOUND)
Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Kicad)
string(REGEX REPLACE "^([0-9]+)\\-([0-9]+)\\-([0-9]+).*" "\\1\\2\\3"
_kicad_svn_date ${Kicad_WC_LAST_CHANGED_DATE})
_kicad_svn_date ${Kicad_WC_LAST_CHANGED_DATE})
set(KICAD_SVN_VERSION
"(${_kicad_svn_date} SVN-R${Kicad_WC_LAST_CHANGED_REV})")
set(KICAD_ABOUT_VERSION
......@@ -20,6 +20,6 @@ macro(create_svn_version_header)
# Generate config.h.
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/config.h.cmake
${CMAKE_BINARY_DIR}/config.h)
${CMAKE_BINARY_DIR}/config.h)
endif(Subversion_FOUND)
endmacro(create_svn_version_header)
# CMake CVS r1.3
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME (DEFAULT_MSG|"Custom failure message") VAR1 ... )
# This macro is intended to be used in FindXXX.cmake modules files.
# It handles the REQUIRED and QUIET argument to FIND_PACKAGE() and
# it also sets the <UPPERCASED_NAME>_FOUND variable.
# The package is found if all variables listed are TRUE.
# Example:
#
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
#
# LibXml2 is considered to be found, if both LIBXML2_LIBRARIES and
# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
# independent whether QUIET was used or not.
# If it is found, the location is reported using the VAR1 argument, so
# here a message "Found LibXml2: /usr/lib/libxml2.so" will be printed out.
# If the second argument is DEFAULT_MSG, the message in the failure case will
# be "Could NOT find LibXml2", if you don't like this message you can specify
# your own custom failure message there.
MACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 )
IF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
SET(_FAIL_MESSAGE "Could NOT find ${_NAME}")
ELSE("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
SET(_FAIL_MESSAGE "${_FAIL_MSG}")
ENDIF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG")
STRING(TOUPPER ${_NAME} _NAME_UPPER)
SET(${_NAME_UPPER}_FOUND TRUE)
IF(NOT ${_VAR1})
SET(${_NAME_UPPER}_FOUND FALSE)
ENDIF(NOT ${_VAR1})
FOREACH(_CURRENT_VAR ${ARGN})
IF(NOT ${_CURRENT_VAR})
SET(${_NAME_UPPER}_FOUND FALSE)
ENDIF(NOT ${_CURRENT_VAR})
ENDFOREACH(_CURRENT_VAR)
IF (${_NAME_UPPER}_FOUND)
# IF (NOT ${_NAME}_FIND_QUIETLY)
# MESSAGE(STATUS "Found ${_NAME}: ${${_VAR1}}")
# ENDIF (NOT ${_NAME}_FIND_QUIETLY)
ELSE (${_NAME_UPPER}_FOUND)
IF (${_NAME}_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "${_FAIL_MESSAGE}")
ELSE (${_NAME}_FIND_REQUIRED)
IF (NOT ${_NAME}_FIND_QUIETLY)
MESSAGE(STATUS "${_FAIL_MESSAGE}")
ENDIF (NOT ${_NAME}_FIND_QUIETLY)
ENDIF (${_NAME}_FIND_REQUIRED)
ENDIF (${_NAME_UPPER}_FOUND)
ENDMACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
# CMake CVS r1.2.2.2
#
# From CMake 2.6.1
#
#
# - Extract information from a subversion working copy
# The module defines the following variables:
# Subversion_SVN_EXECUTABLE - path to svn command line client
......@@ -22,6 +25,8 @@
# IF(Subversion_FOUND)
# Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
# MESSAGE("Current revision is ${Project_WC_REVISION}")
# Subversion_WC_LOG(${PROJECT_SOURCE_DIR} Project)
# MESSAGE("Last changed log is ${Project_LAST_CHANGED_LOG}")
# ENDIF(Subversion_FOUND)
# Copyright (c) 2006, Tristan Carel
......@@ -49,17 +54,11 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# $Id: FindSubversion.cmake,v 1.2.2.2 2008/03/26 18:08:24 hoffman Exp $
# $Id: FindSubversion.cmake,v 1.2.2.3 2008-05-23 20:09:34 hoffman Exp $
SET(Subversion_FOUND FALSE)
SET(Subversion_SVN_FOUND FALSE)
# the subversion commands should be executed with the C locale, otherwise
# the message (which are parsed) may be translated, Alex
SET(_Subversion_SAVED_LC_ALL "$ENV{LC_ALL}" )
SET(ENV{LC_ALL} C)
SET(ENV{LANG} C)
FIND_PROGRAM(Subversion_SVN_EXECUTABLE svn
DOC "subversion command line client")
MARK_AS_ADVANCED(Subversion_SVN_EXECUTABLE)
......@@ -69,6 +68,11 @@ IF(Subversion_SVN_EXECUTABLE)
SET(Subversion_FOUND TRUE)
MACRO(Subversion_WC_INFO dir prefix)
# the subversion commands should be executed with the C locale, otherwise
# the message (which are parsed) may be translated, Alex
SET(_Subversion_SAVED_LC_ALL "$ENV{LC_ALL}")
SET(ENV{LC_ALL} C)
EXECUTE_PROCESS(COMMAND ${Subversion_SVN_EXECUTABLE} --version
WORKING_DIRECTORY ${dir}
OUTPUT_VARIABLE Subversion_VERSION_SVN
......@@ -99,9 +103,19 @@ IF(Subversion_SVN_EXECUTABLE)
ENDIF(NOT ${Subversion_svn_info_result} EQUAL 0)
# restore the previous LC_ALL
SET(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL})
ENDMACRO(Subversion_WC_INFO)
MACRO(Subversion_WC_LOG dir prefix)
# This macro can block if the certificate is not signed:
# svn ask you to accept the certificate and wait for your answer
# This macro requires a svn server network access (Internet most of the time)
# and can also be slow since it access the svn server
EXECUTE_PROCESS(COMMAND
${Subversion_SVN_EXECUTABLE} log -r BASE ${dir}
OUTPUT_VARIABLE Subversion_LAST_CHANGED_LOG
OUTPUT_VARIABLE ${prefix}_LAST_CHANGED_LOG
ERROR_VARIABLE Subversion_svn_log_error
RESULT_VARIABLE Subversion_svn_log_result
OUTPUT_STRIP_TRAILING_WHITESPACE)
......@@ -109,13 +123,10 @@ IF(Subversion_SVN_EXECUTABLE)
IF(NOT ${Subversion_svn_log_result} EQUAL 0)
MESSAGE(SEND_ERROR "Command \"${Subversion_SVN_EXECUTABLE} log -r BASE ${dir}\" failed with output:\n${Subversion_svn_log_error}")
ENDIF(NOT ${Subversion_svn_log_result} EQUAL 0)
ENDMACRO(Subversion_WC_INFO)
ENDMACRO(Subversion_WC_LOG)
ENDIF(Subversion_SVN_EXECUTABLE)
# restore the previous LC_ALL
SET(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL})
IF(NOT Subversion_FOUND)
IF(NOT Subversion_FIND_QUIETLY)
MESSAGE(STATUS "Subversion was not found.")
......
This diff is collapsed.
# CMake CVS r1.5
# - Convenience include for using wxWidgets library
# Finds if wxWidgets is installed
# and set the appropriate libs, incdirs, flags etc.
# INCLUDE_DIRECTORIES, LINK_DIRECTORIES and ADD_DEFINITIONS
# are called.
#
# USAGE
# SET( wxWidgets_USE_LIBS gl xml xrc ) # optionally: more than wx std libs
# FIND_PACKAGE(wxWidgets REQUIRED)
# INCLUDE( ${xWidgets_USE_FILE} )
# ... add your targets here, e.g. ADD_EXECUTABLE/ ADD_LIBRARY ...
# TARGET_LINK_LIBRARIERS( <yourWxDependantTarget> ${wxWidgets_LIBRARIES})
#
# DEPRECATED
# LINK_LIBRARIES is not called in favor of adding dependencies per target.
#
# AUTHOR
# Jan Woetzel <jw -at- mip.informatik.uni-kiel.de>
# debug message and logging.
# comment these out for distribution
IF (NOT LOGFILE )
# SET(LOGFILE "${PROJECT_BINARY_DIR}/CMakeOutput.log")
ENDIF (NOT LOGFILE )
MACRO(MSG _MSG)
# FILE(APPEND ${LOGFILE} "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}\n")
# MESSAGE(STATUS "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}")
ENDMACRO(MSG)
MSG("wxWidgets_FOUND=${wxWidgets_FOUND}")
IF (wxWidgets_FOUND)
IF (wxWidgets_INCLUDE_DIRS)
IF(wxWidgets_INCLUDE_DIRS_NO_SYSTEM)
INCLUDE_DIRECTORIES(${wxWidgets_INCLUDE_DIRS})
ELSE(wxWidgets_INCLUDE_DIRS_NO_SYSTEM)
INCLUDE_DIRECTORIES(SYSTEM ${wxWidgets_INCLUDE_DIRS})
ENDIF(wxWidgets_INCLUDE_DIRS_NO_SYSTEM)
MSG("wxWidgets_INCLUDE_DIRS=${wxWidgets_INCLUDE_DIRS}")
ENDIF(wxWidgets_INCLUDE_DIRS)
IF (wxWidgets_LIBRARY_DIRS)
LINK_DIRECTORIES(${wxWidgets_LIBRARY_DIRS})
MSG("wxWidgets_LIBRARY_DIRS=${wxWidgets_LIBRARY_DIRS}")
ENDIF(wxWidgets_LIBRARY_DIRS)
IF (wxWidgets_DEFINITIONS)
ADD_DEFINITIONS( ${wxWidgets_DEFINITIONS} )
MSG("wxWidgets_DEFINITIONS=${wxWidgets_DEFINITIONS}")
ENDIF(wxWidgets_DEFINITIONS)
IF (wxWidgets_CXX_FLAGS)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}")
MSG("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
ENDIF(wxWidgets_CXX_FLAGS)
# DEPRECATED JW
# just for backward compatibility: add deps to all targets
# library projects better use advanced FIND_PACKAGE(wxWidgets) directly.
#IF(wxWidgets_LIBRARIES)
# LINK_LIBRARIES(${wxWidgets_LIBRARIES})
# # BUG: str too long: MSG("wxWidgets_LIBRARIES=${wxWidgets_LIBRARIES}")
# IF(LOGFILE)
# FILE(APPEND ${LOGFILE} "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${wxWidgets_LIBRARIES}\n")
# ENDIF(LOGFILE)
#ENDIF(wxWidgets_LIBRARIES)
ELSE (wxWidgets_FOUND)
MESSAGE("wxWidgets requested but not found.")
ENDIF(wxWidgets_FOUND)
......@@ -5,7 +5,7 @@
# Compile those *.cpp files and put them into the library, then done.
# builds a set of all the .xpm files
FILE(GLOB BITMAP_SRCS *.xpm)
file(GLOB BITMAP_SRCS *.xpm)
# Get the path of the *.xpm files into "PATH"
set(PATH ${CMAKE_CURRENT_SOURCE_DIR})
......@@ -13,7 +13,8 @@ set(PATH ${CMAKE_CURRENT_SOURCE_DIR})
# The name of the directory to put the copied and renamed *.xpm files into.
# As files are copied they are renamed to *.cpp.
set(XPM_CPP_PATH "${PATH}/auto_renamed_to_cpp" CACHE PATH "path to store renamed .xpm files for compilation" )
set(XPM_CPP_PATH "${PATH}/auto_renamed_to_cpp"
CACHE PATH "path to store renamed .xpm files for compilation")
foreach(LOOP_VAR ${BITMAP_SRCS})
get_filename_component(BASENAME ${LOOP_VAR} NAME_WE)
......
add_definitions(-DCVPCB)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
../3d-viewer
../pcbnew
../polygon)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
../3d-viewer
../pcbnew
../polygon)
set(CVPCB_SRCS
autosel.cpp
......@@ -61,11 +60,11 @@ if(WIN32)
set(CVPCB_RESOURCES cvpcb.rc)
endif(MINGW)
endif(WIN32)
if(APPLE)
set(CVPCB_RESOURCES cvpcb.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/cvpcb.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(MACOSX_BUNDLE_ICON_FILE cvpcb.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb)
set(MACOSX_BUNDLE_NAME cvpcb)
......@@ -73,15 +72,9 @@ endif(APPLE)
add_executable(cvpcb WIN32 MACOSX_BUNDLE ${CVPCB_SRCS} ${CVPCB_EXTRA_SRCS} ${CVPCB_RESOURCES})
target_link_libraries(cvpcb 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES})
target_link_libraries(cvpcb 3d-viewer common polygon bitmaps kbool ${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES})
if(NOT APPLE)
install(TARGETS cvpcb
RUNTIME DESTINATION ${KICAD_BIN}
COMPONENT binary)
else(NOT APPLE)
install(TARGETS cvpcb
install(TARGETS cvpcb
RUNTIME DESTINATION ${KICAD_BIN}
BUNDLE DESTINATION ${KICAD_BIN}
COMPONENT binary)
endif(NOT APPLE)
install(DIRECTORY ecc83 electric flat_hierarchy interf_u microwave
pic_programmer pspice "sonde xilinx" test_xil_95108 video
DESTINATION ${KICAD_DEMOS}
COMPONENT resources
PATTERN ".svn" EXCLUDE)
pic_programmer pspice "sonde xilinx" test_xil_95108 video
DESTINATION ${KICAD_DEMOS}
COMPONENT resources
PATTERN ".svn" EXCLUDE)
......@@ -110,11 +110,11 @@ if(WIN32)
set(EESCHEMA_RESOURCES eeschema.rc)
endif(MINGW)
endif(WIN32)
if(APPLE)
set(EESCHEMA_RESOURCES eeschema.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/eeschema.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(MACOSX_BUNDLE_ICON_FILE eeschema.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.eeschema)
set(MACOSX_BUNDLE_NAME eeschema)
......@@ -124,15 +124,9 @@ add_executable(eeschema WIN32 MACOSX_BUNDLE ${EESCHEMA_SRCS} ${EESCHEMA_EXTRA_SR
target_link_libraries(eeschema common bitmaps ${wxWidgets_LIBRARIES})
if(NOT APPLE)
install(TARGETS eeschema
RUNTIME DESTINATION ${KICAD_BIN}
COMPONENT binary)
else(NOT APPLE)
install(TARGETS eeschema
install(TARGETS eeschema
RUNTIME DESTINATION ${KICAD_BIN}
BUNDLE DESTINATION ${KICAD_BIN}
COMPONENT binary)
endif(NOT APPLE)
add_subdirectory(plugins)
......@@ -4,5 +4,6 @@ endif(UNIX)
add_executable(netlist_form_pads-pcb netlist_form_pads-pcb.cpp)
install(TARGETS netlist_form_pads-pcb RUNTIME DESTINATION ${KICAD_PLUGINS}
COMPONENT binary)
install(TARGETS netlist_form_pads-pcb
RUNTIME DESTINATION ${KICAD_PLUGINS}
COMPONENT binary)
add_definitions(-DGERBVIEW -DPCBNEW)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
../3d-viewer
../cvpcb
../pcbnew
../polygon)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
../3d-viewer
../cvpcb
../pcbnew
../polygon)
set(GERBVIEW_SRCS
affiche.cpp
......@@ -67,11 +66,11 @@ if(WIN32)
set(GERBVIEW_RESOURCES gerbview.rc)
endif(MINGW)
endif(WIN32)
if(APPLE)
set(GERBVIEW_RESOURCES gerbview.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/gerbview.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(MACOSX_BUNDLE_ICON_FILE gerbview.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.gerbview)
set(MACOSX_BUNDLE_NAME gerbview)
......@@ -79,15 +78,9 @@ endif(APPLE)
add_executable(gerbview WIN32 MACOSX_BUNDLE ${GERBVIEW_SRCS} ${GERBVIEW_EXTRA_SRCS} ${GERBVIEW_RESOURCES})
target_link_libraries(gerbview 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES})
target_link_libraries(gerbview 3d-viewer common polygon bitmaps kbool ${wxWidgets_LIBRARIES})
if(NOT APPLE)
install(TARGETS gerbview
RUNTIME DESTINATION ${KICAD_BIN}
COMPONENT binary)
else(NOT APPLE)
install(TARGETS gerbview
install(TARGETS gerbview
RUNTIME DESTINATION ${KICAD_BIN}
BUNDLE DESTINATION ${KICAD_BIN}
COMPONENT binary)
endif(NOT APPLE)
install(DIRECTORY ca cs de es fr hu it ko nl pl pt ru sl sv zh_CN
DESTINATION ${KICAD_INTERNAT}
COMPONENT resources
PATTERN ".svn" EXCLUDE)
DESTINATION ${KICAD_INTERNAT}
COMPONENT resources
PATTERN ".svn" EXCLUDE)
......@@ -19,11 +19,11 @@ if(WIN32)
set(KICAD_RESOURCES kicad.rc)
endif(MINGW)
endif(WIN32)
if(APPLE)
set(KICAD_RESOURCES kicad.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/kicad.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(MACOSX_BUNDLE_ICON_FILE kicad.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.kicad)
set(MACOSX_BUNDLE_NAME kicad)
......@@ -33,16 +33,10 @@ add_executable(kicad WIN32 MACOSX_BUNDLE ${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KIC
target_link_libraries(kicad common bitmaps ${wxWidgets_LIBRARIES})
if(NOT APPLE)
install(TARGETS kicad
RUNTIME DESTINATION ${KICAD_BIN}
COMPONENT binary)
else(NOT APPLE)
install(TARGETS kicad
install(TARGETS kicad
RUNTIME DESTINATION ${KICAD_BIN}
BUNDLE DESTINATION ${KICAD_BIN}
COMPONENT binary)
endif(NOT APPLE)
if(KICAD_MINIZIP)
add_subdirectory(minizip)
......
......@@ -12,9 +12,8 @@ else(ZLIB_FOUND)
set(ZLIB_LIBRARIES ${wxWidgets_ROOT_DIR}/lib/libwxzlib-2.8.a)
endif(ZLIB_FOUND)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${ZLIB_INCLUDE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${ZLIB_INCLUDE_DIR})
set(MINIZIP_SRCS
ioapi.c
......@@ -25,5 +24,6 @@ add_executable(minizip ${MINIZIP_SRCS})
target_link_libraries(minizip ${ZLIB_LIBRARIES})
install(TARGETS minizip RUNTIME DESTINATION ${KICAD_BIN}
COMPONENT binary)
install(TARGETS minizip
RUNTIME DESTINATION ${KICAD_BIN}
COMPONENT binary)
add_definitions(-DPCBNEW)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIR}
../3d-viewer
../polygon)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIR}
../3d-viewer
../polygon)
# Many of the commented out ones are nested in *.cpp files for dialogs
set(PCBNEW_SRCS
......@@ -157,11 +156,11 @@ if(WIN32)
set(PCBNEW_RESOURCES pcbnew.rc)
endif(MINGW)
endif(WIN32)
if(APPLE)
set(PCBNEW_RESOURCES pcbnew.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(MACOSX_BUNDLE_ICON_FILE pcbnew.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pcbnew)
set(MACOSX_BUNDLE_NAME pcbnew)
......@@ -169,18 +168,12 @@ endif(APPLE)
add_executable(pcbnew WIN32 MACOSX_BUNDLE ${PCBNEW_SRCS} ${PCBNEW_EXTRA_SRCS} ${PCBNEW_RESOURCES})
target_link_libraries(pcbnew 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES})
target_link_libraries(pcbnew 3d-viewer common polygon bitmaps kbool ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES})
if(NOT APPLE)
install(TARGETS pcbnew
RUNTIME DESTINATION ${KICAD_BIN}
COMPONENT binary)
else(NOT APPLE)
install(TARGETS pcbnew
install(TARGETS pcbnew
RUNTIME DESTINATION ${KICAD_BIN}
BUNDLE DESTINATION ${KICAD_BIN}
COMPONENT binary)
endif(NOT APPLE)
# This one gets made only when testing.
......
......@@ -4,6 +4,6 @@
file(GLOB png_icons "*.png")
install (FILES ${png_icons}
DESTINATION ${KICAD_PROGRAM_ICONS}
COMPONENT resources)
install(FILES ${png_icons}
DESTINATION ${KICAD_PROGRAM_ICONS}
COMPONENT resources)
install(FILES kicad.pro DESTINATION ${KICAD_TEMPLATE}
COMPONENT resources)
install(FILES kicad.pro
DESTINATION ${KICAD_TEMPLATE}
COMPONENT resources)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment