Fix tkdnd patch for MacOSX

This commit is contained in:
Matthias Hochsteger 2018-12-05 11:41:28 +01:00
parent 9103c4dc1f
commit 695a55e247
2 changed files with 30 additions and 11 deletions

View File

@ -37,7 +37,7 @@ if(APPLE)
URL_MD5 a6d47a996ea957416469b12965d4db91 URL_MD5 a6d47a996ea957416469b12965d4db91
DEPENDS project_tcl project_tk DEPENDS project_tcl project_tk
DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies
PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/tkdnd_macosx.patch PATCH_COMMAND patch < ${CMAKE_CURRENT_LIST_DIR}/tkdnd_macosx.patch
UPDATE_COMMAND "" # Disable update UPDATE_COMMAND "" # Disable update
BUILD_IN_SOURCE 1 BUILD_IN_SOURCE 1
CMAKE_ARGS CMAKE_ARGS

View File

@ -1,21 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt --- CMakeLists.txt 19:24:32.000000000 +0200
index 4eb497c..c6424fc 100644 +++ CMakeLists.txt 2018-12-05 11:34:59.000000000 +0100
--- a/CMakeLists.txt @@ -43,17 +43,18 @@
+++ b/CMakeLists.txt
@@ -43,17 +43,17 @@ IF ( WIN32 )
ELSE ( WIN32 ) ELSE ( WIN32 )
## Unix and OS X... ## Unix and OS X...
IF ( APPLE ) IF ( APPLE )
- SET ( CMAKE_OSX_ARCHITECTURES "x86_64;i386" ) - SET ( CMAKE_OSX_ARCHITECTURES "x86_64;i386" )
+ SET ( CMAKE_OSX_ARCHITECTURES "x86_64") + SET ( CMAKE_OSX_ARCHITECTURES "x86_64")
+ SET( TK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../project_tk/)
+ SET( TCL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../project_tcl/)
FIND_LIBRARY ( COCOA_LIBRARY Cocoa ) FIND_LIBRARY ( COCOA_LIBRARY Cocoa )
INCLUDE_DIRECTORIES ( macosx ) INCLUDE_DIRECTORIES ( macosx )
- INCLUDE_DIRECTORIES ( /Library/Frameworks/Tk.framework/Versions/8.6/PrivateHeaders ) - 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 )
- 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 )
+# INCLUDE_DIRECTORIES ( /Library/Frameworks/Tk.framework/Versions/8.6/PrivateHeaders ) + INCLUDE_DIRECTORIES ( ${TCL_DIR}/macosx ${TCL_DIR}/generic )
+# INCLUDE_DIRECTORIES ( /System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/tk-private ) + INCLUDE_DIRECTORIES ( ${TK_DIR}/macosx ${TK_DIR}/generic ${TK_DIR}/xlib )
+# INCLUDE_DIRECTORIES ( /System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/tk-private )
ADD_DEFINITIONS ( -DMAC_TK_COCOA -DMAC_OSX_TK) ADD_DEFINITIONS ( -DMAC_TK_COCOA -DMAC_OSX_TK)
ADD_DEFINITIONS ( -DMAC_OSX_TK ) ADD_DEFINITIONS ( -DMAC_OSX_TK )
ADD_DEFINITIONS ( -std=gnu99 ) ADD_DEFINITIONS ( -std=gnu99 )
@ -25,12 +24,32 @@ index 4eb497c..c6424fc 100644
ADD_DEFINITIONS ( -fno-objc-arc ) ADD_DEFINITIONS ( -fno-objc-arc )
# ADD_DEFINITIONS ( -fobjc-arc ) # ADD_DEFINITIONS ( -fobjc-arc )
LINK_LIBRARIES ( ${COCOA_LIBRARY} ) LINK_LIBRARIES ( ${COCOA_LIBRARY} )
@@ -125,7 +125,7 @@ SET ( CP ${CMAKE_COMMAND} -E copy ) @@ -125,8 +126,8 @@
## Locate Tcl/Tk ## Locate Tcl/Tk
## =========================================================================== ## ===========================================================================
MESSAGE ( STATUS "Searching for Tcl/Tk..." ) MESSAGE ( STATUS "Searching for Tcl/Tk..." )
-FIND_PACKAGE ( TCL REQUIRED ) -FIND_PACKAGE ( TCL REQUIRED )
-FIND_PACKAGE ( TclStub REQUIRED )
+#FIND_PACKAGE ( TCL REQUIRED ) +#FIND_PACKAGE ( TCL REQUIRED )
FIND_PACKAGE ( TclStub REQUIRED ) +#FIND_PACKAGE ( TclStub REQUIRED )
## Tcl/Tk info (useful for debug purposes)... ## Tcl/Tk info (useful for debug purposes)...
# 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} )