Commit 8f0a773b authored by Dick Hollenbeck's avatar Dick Hollenbeck

Add custom target on linux to make build-dir symlinks.

parent 8416c5d6
add_definitions(-DKICAD)
add_definitions( -DKICAD )
include_directories(BEFORE ${INC_BEFORE})
include_directories( BEFORE ${INC_BEFORE} )
include_directories(
${INC_AFTER}
)
set(KICAD_SRCS
set( KICAD_SRCS
class_treeprojectfiles.cpp
class_treeproject_item.cpp
commandframe.cpp
......@@ -19,48 +19,66 @@ set(KICAD_SRCS
preferences.cpp
prjconfig.cpp
project_template.cpp
tree_project_frame.cpp)
tree_project_frame.cpp
)
if(MINGW)
if( MINGW )
# KICAD_RESOURCES variable is set by the macro.
mingw_resource_compiler(kicad)
mingw_resource_compiler( kicad )
endif()
if(APPLE)
set(KICAD_RESOURCES kicad.icns kicad_doc.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/kicad.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/kicad_doc.icns"
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)
endif(APPLE)
if( APPLE )
set( KICAD_RESOURCES kicad.icns kicad_doc.icns )
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/kicad.icns" PROPERTIES
MACOSX_PACKAGE_LOCATION Resources
)
set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/kicad_doc.icns" 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 )
endif()
add_executable(kicad WIN32 MACOSX_BUNDLE
add_executable( kicad WIN32 MACOSX_BUNDLE
${KICAD_SRCS}
${KICAD_EXTRA_SRCS}
${KICAD_RESOURCES}
)
if(APPLE)
set_target_properties(kicad PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
target_link_libraries(kicad
if( UNIX )
# for build directory: create kiface symlinks so kicad (exe) can be run in-situ
add_custom_target( kiface_sym_links
COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_BINARY_DIR}/eeschema/_eeschema.kiface" "${CMAKE_BINARY_DIR}/kicad/_eeschema.kiface"
COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.kiface" "${CMAKE_BINARY_DIR}/kicad/_pcbnew.kiface"
COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_BINARY_DIR}/cvpcb/_cvpcb.kiface" "${CMAKE_BINARY_DIR}/kicad/_cvpcb.kiface"
COMMENT "Making <build-dir>/kicad/<kiface.symlinks>"
)
endif()
if( APPLE )
set_target_properties( kicad PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
)
target_link_libraries( kicad
common
bitmaps
polygon
${wxWidgets_LIBRARIES}
)
else(APPLE)
target_link_libraries(kicad
else()
target_link_libraries( kicad
common
bitmaps
polygon
${wxWidgets_LIBRARIES}
${GDI_PLUS_LIBRARIES}
)
endif(APPLE)
endif()
install( TARGETS kicad
DESTINATION ${KICAD_BIN}
COMPONENT binary
)
install(TARGETS kicad
DESTINATION ${KICAD_BIN}
COMPONENT binary)
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