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)
......
...@@ -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)
...@@ -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)
...@@ -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)
...@@ -29,15 +29,20 @@ if(APPLE) ...@@ -29,15 +29,20 @@ if(APPLE)
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)
......
...@@ -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