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) add_definitions(-DPCBNEW)
include_directories( include_directories(../pcbnew
../pcbnew
../polygon) ../polygon)
set(3D-VIEWER_SRCS set(3D-VIEWER_SRCS
......
project(kicad) project(kicad)
if(NOT APPLE) if(WIN32)
cmake_minimum_required(VERSION 2.4.6 FATAL_ERROR) cmake_minimum_required(VERSION 2.6.1 FATAL_ERROR)
else(NOT APPLE) else(WIN32)
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
endif(NOT APPLE) endif(WIN32)
# Path to local CMake modules. # Path to local CMake modules.
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
...@@ -23,7 +23,6 @@ option(KICAD_MINIZIP "enable/disable building minizip (default ON)" ON) ...@@ -23,7 +23,6 @@ option(KICAD_MINIZIP "enable/disable building minizip (default ON)" ON)
#================================================ #================================================
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
# Set default flags for Release build. # Set default flags for Release build.
set(CMAKE_C_FLAGS_RELEASE "-Wall -O2 -DNDEBUG") set(CMAKE_C_FLAGS_RELEASE "-Wall -O2 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O2 -DNDEBUG") set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O2 -DNDEBUG")
...@@ -32,7 +31,6 @@ if(CMAKE_COMPILER_IS_GNUCXX) ...@@ -32,7 +31,6 @@ if(CMAKE_COMPILER_IS_GNUCXX)
# Set default flags for Debug build. # Set default flags for Debug build.
set(CMAKE_C_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG") set(CMAKE_C_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG") set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG")
endif(CMAKE_COMPILER_IS_GNUCXX) endif(CMAKE_COMPILER_IS_GNUCXX)
# Locations for install targets. # Locations for install targets.
...@@ -51,11 +49,15 @@ endif(UNIX) ...@@ -51,11 +49,15 @@ endif(UNIX)
if(WIN32) if(WIN32)
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line. # 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. # Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
set(KICAD_PLUGINS ${KICAD_BIN}/plugins CACHE PATH "Location of KiCad plugins.") set(KICAD_PLUGINS ${KICAD_BIN}/plugins
set(KICAD_DATA share CACHE PATH "Location of KiCad data files.") CACHE PATH "Location of KiCad plugins.")
set(KICAD_DOCS doc CACHE PATH "Location of KiCad documentation files.") set(KICAD_DATA share
CACHE PATH "Location of KiCad data files.")
set(KICAD_DOCS doc
CACHE PATH "Location of KiCad documentation files.")
endif(WIN32) endif(WIN32)
set(KICAD_DEMOS ${KICAD_DATA}/demos set(KICAD_DEMOS ${KICAD_DATA}/demos
...@@ -83,13 +85,13 @@ include(CheckFindPackageResult) ...@@ -83,13 +85,13 @@ include(CheckFindPackageResult)
####################### #######################
# Find OpenGL library # # Find OpenGL library #
####################### #######################
find_package(OpenGL) find_package(OpenGL QUIET)
check_find_package_result(OPENGL_FOUND "OpenGL") check_find_package_result(OPENGL_FOUND "OpenGL")
###################### ######################
# Find Boost library # # Find Boost library #
###################### ######################
find_package(Boost) find_package(Boost QUIET)
check_find_package_result(Boost_FOUND "Boost") check_find_package_result(Boost_FOUND "Boost")
########################## ##########################
...@@ -98,8 +100,7 @@ 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 # Here you can define what libraries of wxWidgets you need for your
# application. You can figure out what libraries you need here; # application. You can figure out what libraries you need here;
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html # http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
set(wxWidgets_USE_LIBS base core adv gl html net) find_package(wxWidgets COMPONENTS base core adv gl html net QUIET)
find_package(wxWidgetsCVS)
check_find_package_result(wxWidgets_FOUND "wxWidgets") check_find_package_result(wxWidgets_FOUND "wxWidgets")
...@@ -173,7 +174,6 @@ install(FILES freeroute.jnlp ...@@ -173,7 +174,6 @@ install(FILES freeroute.jnlp
if(UNIX) if(UNIX)
# set resource dir variables # set resource dir variables
#set(KICAD_PROGRAM_ICONS ${CMAKE_INSTALL_PREFIX}/share/kicad/icons) #set(KICAD_PROGRAM_ICONS ${CMAKE_INSTALL_PREFIX}/share/kicad/icons)
set(LINUX_RESOURCES_DIR resources/linux) set(LINUX_RESOURCES_DIR resources/linux)
...@@ -236,5 +236,4 @@ if(UNIX) ...@@ -236,5 +236,4 @@ if(UNIX)
install(FILES ${LINUX_DESKTOP_ICONS}/kicad_pcbnew.png install(FILES ${LINUX_DESKTOP_ICONS}/kicad_pcbnew.png
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps
COMPONENT resources) COMPONENT resources)
endif(UNIX) endif(UNIX)
macro(create_svn_version_header) macro(create_svn_version_header)
# Include Subversion support to automagically create version header file. # Include Subversion support to automagically create version header file.
find_package(SubversionCVS) find_package(Subversion)
if(Subversion_FOUND) if(Subversion_FOUND)
Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Kicad) Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Kicad)
string(REGEX REPLACE "^([0-9]+)\\-([0-9]+)\\-([0-9]+).*" "\\1\\2\\3" string(REGEX REPLACE "^([0-9]+)\\-([0-9]+)\\-([0-9]+).*" "\\1\\2\\3"
......
# 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 # - Extract information from a subversion working copy
# The module defines the following variables: # The module defines the following variables:
...@@ -22,6 +25,8 @@ ...@@ -22,6 +25,8 @@
# IF(Subversion_FOUND) # IF(Subversion_FOUND)
# Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project) # Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project)
# MESSAGE("Current revision is ${Project_WC_REVISION}") # 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) # ENDIF(Subversion_FOUND)
# Copyright (c) 2006, Tristan Carel # Copyright (c) 2006, Tristan Carel
...@@ -49,17 +54,11 @@ ...@@ -49,17 +54,11 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # 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_FOUND FALSE)
SET(Subversion_SVN_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 FIND_PROGRAM(Subversion_SVN_EXECUTABLE svn
DOC "subversion command line client") DOC "subversion command line client")
MARK_AS_ADVANCED(Subversion_SVN_EXECUTABLE) MARK_AS_ADVANCED(Subversion_SVN_EXECUTABLE)
...@@ -69,6 +68,11 @@ IF(Subversion_SVN_EXECUTABLE) ...@@ -69,6 +68,11 @@ IF(Subversion_SVN_EXECUTABLE)
SET(Subversion_FOUND TRUE) SET(Subversion_FOUND TRUE)
MACRO(Subversion_WC_INFO dir prefix) 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 EXECUTE_PROCESS(COMMAND ${Subversion_SVN_EXECUTABLE} --version
WORKING_DIRECTORY ${dir} WORKING_DIRECTORY ${dir}
OUTPUT_VARIABLE Subversion_VERSION_SVN OUTPUT_VARIABLE Subversion_VERSION_SVN
...@@ -99,9 +103,19 @@ IF(Subversion_SVN_EXECUTABLE) ...@@ -99,9 +103,19 @@ IF(Subversion_SVN_EXECUTABLE)
ENDIF(NOT ${Subversion_svn_info_result} EQUAL 0) 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 EXECUTE_PROCESS(COMMAND
${Subversion_SVN_EXECUTABLE} log -r BASE ${dir} ${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 ERROR_VARIABLE Subversion_svn_log_error
RESULT_VARIABLE Subversion_svn_log_result RESULT_VARIABLE Subversion_svn_log_result
OUTPUT_STRIP_TRAILING_WHITESPACE) OUTPUT_STRIP_TRAILING_WHITESPACE)
...@@ -109,13 +123,10 @@ IF(Subversion_SVN_EXECUTABLE) ...@@ -109,13 +123,10 @@ IF(Subversion_SVN_EXECUTABLE)
IF(NOT ${Subversion_svn_log_result} EQUAL 0) 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}") 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) ENDIF(NOT ${Subversion_svn_log_result} EQUAL 0)
ENDMACRO(Subversion_WC_INFO) ENDMACRO(Subversion_WC_LOG)
ENDIF(Subversion_SVN_EXECUTABLE) ENDIF(Subversion_SVN_EXECUTABLE)
# restore the previous LC_ALL
SET(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL})
IF(NOT Subversion_FOUND) IF(NOT Subversion_FOUND)
IF(NOT Subversion_FIND_QUIETLY) IF(NOT Subversion_FIND_QUIETLY)
MESSAGE(STATUS "Subversion was not found.") 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 @@ ...@@ -5,7 +5,7 @@
# Compile those *.cpp files and put them into the library, then done. # Compile those *.cpp files and put them into the library, then done.
# builds a set of all the .xpm files # 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" # Get the path of the *.xpm files into "PATH"
set(PATH ${CMAKE_CURRENT_SOURCE_DIR}) set(PATH ${CMAKE_CURRENT_SOURCE_DIR})
...@@ -13,7 +13,8 @@ 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. # The name of the directory to put the copied and renamed *.xpm files into.
# As files are copied they are renamed to *.cpp. # 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}) foreach(LOOP_VAR ${BITMAP_SRCS})
get_filename_component(BASENAME ${LOOP_VAR} NAME_WE) get_filename_component(BASENAME ${LOOP_VAR} NAME_WE)
......
add_definitions(-DCVPCB) add_definitions(-DCVPCB)
include_directories( include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
../3d-viewer ../3d-viewer
../pcbnew ../pcbnew
../polygon) ../polygon)
...@@ -61,11 +60,11 @@ if(WIN32) ...@@ -61,11 +60,11 @@ if(WIN32)
set(CVPCB_RESOURCES cvpcb.rc) set(CVPCB_RESOURCES cvpcb.rc)
endif(MINGW) endif(MINGW)
endif(WIN32) endif(WIN32)
if(APPLE) if(APPLE)
set(CVPCB_RESOURCES cvpcb.icns) set(CVPCB_RESOURCES cvpcb.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/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_ICON_FILE cvpcb.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb) set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb)
set(MACOSX_BUNDLE_NAME cvpcb) set(MACOSX_BUNDLE_NAME cvpcb)
...@@ -73,15 +72,9 @@ endif(APPLE) ...@@ -73,15 +72,9 @@ endif(APPLE)
add_executable(cvpcb WIN32 MACOSX_BUNDLE ${CVPCB_SRCS} ${CVPCB_EXTRA_SRCS} ${CVPCB_RESOURCES}) 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
install(TARGETS cvpcb
RUNTIME DESTINATION ${KICAD_BIN}
COMPONENT binary)
else(NOT APPLE)
install(TARGETS cvpcb
RUNTIME DESTINATION ${KICAD_BIN} RUNTIME DESTINATION ${KICAD_BIN}
BUNDLE DESTINATION ${KICAD_BIN} BUNDLE DESTINATION ${KICAD_BIN}
COMPONENT binary) COMPONENT binary)
endif(NOT APPLE)
...@@ -110,11 +110,11 @@ if(WIN32) ...@@ -110,11 +110,11 @@ if(WIN32)
set(EESCHEMA_RESOURCES eeschema.rc) set(EESCHEMA_RESOURCES eeschema.rc)
endif(MINGW) endif(MINGW)
endif(WIN32) endif(WIN32)
if(APPLE) if(APPLE)
set(EESCHEMA_RESOURCES eeschema.icns) set(EESCHEMA_RESOURCES eeschema.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/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_ICON_FILE eeschema.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.eeschema) set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.eeschema)
set(MACOSX_BUNDLE_NAME eeschema) set(MACOSX_BUNDLE_NAME eeschema)
...@@ -124,15 +124,9 @@ add_executable(eeschema WIN32 MACOSX_BUNDLE ${EESCHEMA_SRCS} ${EESCHEMA_EXTRA_SR ...@@ -124,15 +124,9 @@ add_executable(eeschema WIN32 MACOSX_BUNDLE ${EESCHEMA_SRCS} ${EESCHEMA_EXTRA_SR
target_link_libraries(eeschema common bitmaps ${wxWidgets_LIBRARIES}) target_link_libraries(eeschema common bitmaps ${wxWidgets_LIBRARIES})
if(NOT APPLE) install(TARGETS eeschema
install(TARGETS eeschema
RUNTIME DESTINATION ${KICAD_BIN}
COMPONENT binary)
else(NOT APPLE)
install(TARGETS eeschema
RUNTIME DESTINATION ${KICAD_BIN} RUNTIME DESTINATION ${KICAD_BIN}
BUNDLE DESTINATION ${KICAD_BIN} BUNDLE DESTINATION ${KICAD_BIN}
COMPONENT binary) COMPONENT binary)
endif(NOT APPLE)
add_subdirectory(plugins) add_subdirectory(plugins)
...@@ -4,5 +4,6 @@ endif(UNIX) ...@@ -4,5 +4,6 @@ endif(UNIX)
add_executable(netlist_form_pads-pcb netlist_form_pads-pcb.cpp) add_executable(netlist_form_pads-pcb netlist_form_pads-pcb.cpp)
install(TARGETS netlist_form_pads-pcb RUNTIME DESTINATION ${KICAD_PLUGINS} install(TARGETS netlist_form_pads-pcb
RUNTIME DESTINATION ${KICAD_PLUGINS}
COMPONENT binary) COMPONENT binary)
add_definitions(-DGERBVIEW -DPCBNEW) add_definitions(-DGERBVIEW -DPCBNEW)
include_directories( include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
../3d-viewer ../3d-viewer
../cvpcb ../cvpcb
../pcbnew ../pcbnew
...@@ -67,11 +66,11 @@ if(WIN32) ...@@ -67,11 +66,11 @@ if(WIN32)
set(GERBVIEW_RESOURCES gerbview.rc) set(GERBVIEW_RESOURCES gerbview.rc)
endif(MINGW) endif(MINGW)
endif(WIN32) endif(WIN32)
if(APPLE) if(APPLE)
set(GERBVIEW_RESOURCES gerbview.icns) set(GERBVIEW_RESOURCES gerbview.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/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_ICON_FILE gerbview.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.gerbview) set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.gerbview)
set(MACOSX_BUNDLE_NAME gerbview) set(MACOSX_BUNDLE_NAME gerbview)
...@@ -79,15 +78,9 @@ endif(APPLE) ...@@ -79,15 +78,9 @@ endif(APPLE)
add_executable(gerbview WIN32 MACOSX_BUNDLE ${GERBVIEW_SRCS} ${GERBVIEW_EXTRA_SRCS} ${GERBVIEW_RESOURCES}) 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
install(TARGETS gerbview
RUNTIME DESTINATION ${KICAD_BIN}
COMPONENT binary)
else(NOT APPLE)
install(TARGETS gerbview
RUNTIME DESTINATION ${KICAD_BIN} RUNTIME DESTINATION ${KICAD_BIN}
BUNDLE DESTINATION ${KICAD_BIN} BUNDLE DESTINATION ${KICAD_BIN}
COMPONENT binary) COMPONENT binary)
endif(NOT APPLE)
...@@ -19,11 +19,11 @@ if(WIN32) ...@@ -19,11 +19,11 @@ if(WIN32)
set(KICAD_RESOURCES kicad.rc) set(KICAD_RESOURCES kicad.rc)
endif(MINGW) endif(MINGW)
endif(WIN32) endif(WIN32)
if(APPLE) if(APPLE)
set(KICAD_RESOURCES kicad.icns) set(KICAD_RESOURCES kicad.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/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_ICON_FILE kicad.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.kicad) set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.kicad)
set(MACOSX_BUNDLE_NAME kicad) set(MACOSX_BUNDLE_NAME kicad)
...@@ -33,16 +33,10 @@ add_executable(kicad WIN32 MACOSX_BUNDLE ${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KIC ...@@ -33,16 +33,10 @@ add_executable(kicad WIN32 MACOSX_BUNDLE ${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KIC
target_link_libraries(kicad common bitmaps ${wxWidgets_LIBRARIES}) target_link_libraries(kicad common bitmaps ${wxWidgets_LIBRARIES})
if(NOT APPLE) install(TARGETS kicad
install(TARGETS kicad
RUNTIME DESTINATION ${KICAD_BIN}
COMPONENT binary)
else(NOT APPLE)
install(TARGETS kicad
RUNTIME DESTINATION ${KICAD_BIN} RUNTIME DESTINATION ${KICAD_BIN}
BUNDLE DESTINATION ${KICAD_BIN} BUNDLE DESTINATION ${KICAD_BIN}
COMPONENT binary) COMPONENT binary)
endif(NOT APPLE)
if(KICAD_MINIZIP) if(KICAD_MINIZIP)
add_subdirectory(minizip) add_subdirectory(minizip)
......
...@@ -12,8 +12,7 @@ else(ZLIB_FOUND) ...@@ -12,8 +12,7 @@ else(ZLIB_FOUND)
set(ZLIB_LIBRARIES ${wxWidgets_ROOT_DIR}/lib/libwxzlib-2.8.a) set(ZLIB_LIBRARIES ${wxWidgets_ROOT_DIR}/lib/libwxzlib-2.8.a)
endif(ZLIB_FOUND) endif(ZLIB_FOUND)
include_directories( include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${ZLIB_INCLUDE_DIR}) ${ZLIB_INCLUDE_DIR})
set(MINIZIP_SRCS set(MINIZIP_SRCS
...@@ -25,5 +24,6 @@ add_executable(minizip ${MINIZIP_SRCS}) ...@@ -25,5 +24,6 @@ add_executable(minizip ${MINIZIP_SRCS})
target_link_libraries(minizip ${ZLIB_LIBRARIES}) target_link_libraries(minizip ${ZLIB_LIBRARIES})
install(TARGETS minizip RUNTIME DESTINATION ${KICAD_BIN} install(TARGETS minizip
RUNTIME DESTINATION ${KICAD_BIN}
COMPONENT binary) COMPONENT binary)
add_definitions(-DPCBNEW) add_definitions(-DPCBNEW)
include_directories( include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIR} ${Boost_INCLUDE_DIR}
../3d-viewer ../3d-viewer
../polygon) ../polygon)
...@@ -157,11 +156,11 @@ if(WIN32) ...@@ -157,11 +156,11 @@ if(WIN32)
set(PCBNEW_RESOURCES pcbnew.rc) set(PCBNEW_RESOURCES pcbnew.rc)
endif(MINGW) endif(MINGW)
endif(WIN32) endif(WIN32)
if(APPLE) if(APPLE)
set(PCBNEW_RESOURCES pcbnew.icns) set(PCBNEW_RESOURCES pcbnew.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/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_ICON_FILE pcbnew.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pcbnew) set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pcbnew)
set(MACOSX_BUNDLE_NAME pcbnew) set(MACOSX_BUNDLE_NAME pcbnew)
...@@ -169,18 +168,12 @@ endif(APPLE) ...@@ -169,18 +168,12 @@ endif(APPLE)
add_executable(pcbnew WIN32 MACOSX_BUNDLE ${PCBNEW_SRCS} ${PCBNEW_EXTRA_SRCS} ${PCBNEW_RESOURCES}) 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
install(TARGETS pcbnew
RUNTIME DESTINATION ${KICAD_BIN}
COMPONENT binary)
else(NOT APPLE)
install(TARGETS pcbnew
RUNTIME DESTINATION ${KICAD_BIN} RUNTIME DESTINATION ${KICAD_BIN}
BUNDLE DESTINATION ${KICAD_BIN} BUNDLE DESTINATION ${KICAD_BIN}
COMPONENT binary) COMPONENT binary)
endif(NOT APPLE)
# This one gets made only when testing. # This one gets made only when testing.
......
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
file(GLOB png_icons "*.png") file(GLOB png_icons "*.png")
install (FILES ${png_icons} install(FILES ${png_icons}
DESTINATION ${KICAD_PROGRAM_ICONS} DESTINATION ${KICAD_PROGRAM_ICONS}
COMPONENT resources) COMPONENT resources)
install(FILES kicad.pro DESTINATION ${KICAD_TEMPLATE} install(FILES kicad.pro
DESTINATION ${KICAD_TEMPLATE}
COMPONENT resources) 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