Commit 0fedf6b3 authored by Miguel Angel Ajo's avatar Miguel Angel Ajo

MacOSX compilation fixes

parent 4cb0cf64
......@@ -32,6 +32,11 @@
#pragma warning(disable:4521) // Multiple copy constuctors.
#endif
#ifdef __APPLE__
// this fixes some already defined "check" in MacOSX headers
#undef check
#endif
namespace boost { namespace ptr_container_detail {
......
......@@ -331,9 +331,9 @@ if (KICAD_SCRIPTING_MODULES)
endif (KICAD_SCRIPTING_MODULES)
if ((KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) AND NOT WIN32)
if ((KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) AND NOT WIN32 AND NOT APPLE)
set ( PCBNEW_EXTRA_LIBS "rt" )
endif ((KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) AND NOT WIN32)
endif ((KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) AND NOT WIN32 AND NOT APPLE)
###
......@@ -430,11 +430,19 @@ target_link_libraries(pcbnew
install(TARGETS pcbnew
DESTINATION ${KICAD_BIN}
COMPONENT binary)
if(WIN32)
set(FINAL_EXE,pcbnew.exe)
elseif(APPLE)
set(FINAL_EXE,pcbnew.app/Contents/MacOS/pcbnew)
else()
set(FINAL_EXE,pcbnew)
endif(WIN32)
if(KICAD_SCRIPTING)
add_custom_target(FixSwigImportsScripting ALL
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../scripting/fixswigimports.py ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/pcbnew
${CMAKE_CURRENT_SOURCE_DIR}/../scripting/fixswigimports.py ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${FINAL_EXE}
COMMENT "Fixing swig_import_helper in Kicad scripting"
)
......
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