Commit c77e62eb authored by f3nix's avatar f3nix

Fix Windows build with CMake 2.4.

parent c95f2647
project(kicad) project(kicad)
cmake_minimum_required(VERSION 2.4.6 FATAL_ERROR) if(NOT APPLE)
cmake_minimum_required(VERSION 2.4.6 FATAL_ERROR)
else(NOT APPLE)
cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
endif(NOT APPLE)
# 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)
......
...@@ -67,7 +67,7 @@ endif(WIN32) ...@@ -67,7 +67,7 @@ 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)
...@@ -78,7 +78,13 @@ add_executable(cvpcb WIN32 MACOSX_BUNDLE ${CVPCB_SRCS} ${CVPCB_EXTRA_SRCS} ${CVP ...@@ -78,7 +78,13 @@ add_executable(cvpcb WIN32 MACOSX_BUNDLE ${CVPCB_SRCS} ${CVPCB_EXTRA_SRCS} ${CVP
target_link_libraries(cvpcb 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES}) target_link_libraries(cvpcb 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES})
install(TARGETS cvpcb if(NOT APPLE)
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)
...@@ -113,7 +113,7 @@ endif(WIN32) ...@@ -113,7 +113,7 @@ 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)
...@@ -124,9 +124,15 @@ add_executable(eeschema WIN32 MACOSX_BUNDLE ${EESCHEMA_SRCS} ${EESCHEMA_EXTRA_SR ...@@ -124,9 +124,15 @@ 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})
install(TARGETS eeschema if(NOT APPLE)
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)
...@@ -70,7 +70,7 @@ endif(WIN32) ...@@ -70,7 +70,7 @@ 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)
...@@ -81,7 +81,13 @@ add_executable(gerbview WIN32 MACOSX_BUNDLE ${GERBVIEW_SRCS} ${GERBVIEW_EXTRA_SR ...@@ -81,7 +81,13 @@ add_executable(gerbview WIN32 MACOSX_BUNDLE ${GERBVIEW_SRCS} ${GERBVIEW_EXTRA_SR
target_link_libraries(gerbview 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES}) target_link_libraries(gerbview 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES})
install(TARGETS gerbview if(NOT APPLE)
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)
...@@ -22,22 +22,27 @@ endif(WIN32) ...@@ -22,22 +22,27 @@ 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)
endif(APPLE) endif(APPLE)
add_executable(kicad WIN32 MACOSX_BUNDLE add_executable(kicad WIN32 MACOSX_BUNDLE ${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KICAD_RESOURCES})
${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KICAD_RESOURCES})
target_link_libraries(kicad common bitmaps ${wxWidgets_LIBRARIES}) target_link_libraries(kicad common bitmaps ${wxWidgets_LIBRARIES})
install(TARGETS kicad if(NOT APPLE)
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)
......
...@@ -159,7 +159,7 @@ endif(WIN32) ...@@ -159,7 +159,7 @@ 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)
...@@ -170,10 +170,16 @@ add_executable(pcbnew WIN32 MACOSX_BUNDLE ${PCBNEW_SRCS} ${PCBNEW_EXTRA_SRCS} ${ ...@@ -170,10 +170,16 @@ add_executable(pcbnew WIN32 MACOSX_BUNDLE ${PCBNEW_SRCS} ${PCBNEW_EXTRA_SRCS} ${
target_link_libraries(pcbnew 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES}) target_link_libraries(pcbnew 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES})
install(TARGETS pcbnew if(NOT APPLE)
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.
......
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