netgen/cmake/external_projects/tkdnd_macosx.patch

56 lines
2.4 KiB
Diff
Raw Normal View History

2018-12-05 15:41:28 +05:00
--- CMakeLists.txt 19:24:32.000000000 +0200
+++ CMakeLists.txt 2018-12-05 11:34:59.000000000 +0100
@@ -43,17 +43,18 @@
ELSE ( WIN32 )
## Unix and OS X...
IF ( APPLE )
- SET ( CMAKE_OSX_ARCHITECTURES "x86_64;i386" )
+ SET ( CMAKE_OSX_ARCHITECTURES "x86_64")
2018-12-05 15:41:28 +05:00
+ SET( TK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../project_tk/)
+ SET( TCL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../project_tcl/)
FIND_LIBRARY ( COCOA_LIBRARY Cocoa )
INCLUDE_DIRECTORIES ( macosx )
- INCLUDE_DIRECTORIES ( /Library/Frameworks/Tk.framework/Versions/8.6/PrivateHeaders )
- INCLUDE_DIRECTORIES ( /System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/tk-private )
- INCLUDE_DIRECTORIES ( /System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/tk-private )
2018-12-05 15:41:28 +05:00
+ INCLUDE_DIRECTORIES ( ${TCL_DIR}/macosx ${TCL_DIR}/generic )
+ INCLUDE_DIRECTORIES ( ${TK_DIR}/macosx ${TK_DIR}/generic ${TK_DIR}/xlib )
ADD_DEFINITIONS ( -DMAC_TK_COCOA -DMAC_OSX_TK)
ADD_DEFINITIONS ( -DMAC_OSX_TK )
ADD_DEFINITIONS ( -std=gnu99 )
ADD_DEFINITIONS ( -x objective-c )
- ADD_DEFINITIONS ( -fobjc-gc )
+# ADD_DEFINITIONS ( -fobjc-gc )
ADD_DEFINITIONS ( -fno-objc-arc )
# ADD_DEFINITIONS ( -fobjc-arc )
LINK_LIBRARIES ( ${COCOA_LIBRARY} )
2018-12-05 15:41:28 +05:00
@@ -125,8 +126,8 @@
## Locate Tcl/Tk
## ===========================================================================
MESSAGE ( STATUS "Searching for Tcl/Tk..." )
-FIND_PACKAGE ( TCL REQUIRED )
2018-12-05 15:41:28 +05:00
-FIND_PACKAGE ( TclStub REQUIRED )
+#FIND_PACKAGE ( TCL REQUIRED )
2018-12-05 15:41:28 +05:00
+#FIND_PACKAGE ( TclStub REQUIRED )
## Tcl/Tk info (useful for debug purposes)...
2018-12-05 15:41:28 +05:00
# MESSAGE ( STATUS " TCL_TCLSH: " ${TCL_TCLSH} )
@@ -139,13 +140,13 @@
# MESSAGE ( STATUS " TK_LIBRARY: " ${TK_LIBRARY} )
## Enable Tcl/Tk stubs globally...
-ADD_DEFINITIONS ( -DUSE_TCL_STUBS )
-ADD_DEFINITIONS ( -DUSE_TK_STUBS )
+#ADD_DEFINITIONS ( -DUSE_TCL_STUBS )
+#ADD_DEFINITIONS ( -DUSE_TK_STUBS )
ADD_DEFINITIONS ( -DTCL_THREADS )
INCLUDE_DIRECTORIES ( ${TCL_INCLUDE_PATH} )
INCLUDE_DIRECTORIES ( ${TK_INCLUDE_PATH} )
-LINK_LIBRARIES ( ${TCL_STUB_LIBRARY} )
-LINK_LIBRARIES ( ${TK_STUB_LIBRARY} )
+LINK_LIBRARIES ( ${TCL_LIBRARY} )
+LINK_LIBRARIES ( ${TK_LIBRARY} )
IF ( WIN32 AND NO_MSVCRT )
STRING ( REPLACE /MD /MT CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE} )