MacOS build fix

This commit is contained in:
Matthias Hochsteger 2017-01-16 12:12:41 +01:00
parent d91127832a
commit c6783a4d98

View File

@ -1,16 +1,17 @@
if(APPLE)
set(HOME $ENV{HOME})
set(tcl_prefix ${CMAKE_INSTALL_PREFIX}/../../)
ExternalProject_Add(tcl
URL "http://sourceforge.net/projects/tcl/files/Tcl/8.6.4/tcl8.6.4-src.tar.gz"
URL_MD5 d7cbb91f1ded1919370a30edd1534304
DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies
UPDATE_COMMAND "" # Disable update
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ""
BUILD_COMMAND make -C macosx install-embedded INSTALL_ROOT=/ INSTALL_PATH=${CMAKE_INSTALL_PREFIX}/../Frameworks
INSTALL_COMMAND ""
CONFIGURE_COMMAND ../tcl/macosx/configure --enable-threads --enable-framework --prefix=${tcl_prefix} --libdir=${tcl_prefix}/Contents/Frameworks --bindir=${tcl_prefix}/Contents/Frameworks/Tcl.framework/bin
BUILD_COMMAND make -j4
INSTALL_COMMAND make install-binaries install-headers install-libraries install-private-headers
LOG_DOWNLOAD 1
LOG_BUILD 1
LOG_CONFIGURE 1
LOG_INSTALL 1
)
@ -20,34 +21,33 @@ if(APPLE)
URL_MD5 261754d7dc2a582f00e35547777e1fea
DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies
UPDATE_COMMAND "" # Disable update
PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/tk_macosx.patch
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ""
BUILD_COMMAND make -C macosx install-embedded INSTALL_ROOT=/ INSTALL_PATH=${CMAKE_INSTALL_PREFIX}/../Frameworks TCL_FRAMEWORK_DIR=${CMAKE_INSTALL_PREFIX}/../Frameworks/Tcl.framework
INSTALL_COMMAND ""#make -C macosx install
CONFIGURE_COMMAND ../tk/macosx/configure --enable-aqua=yes --enable-threads --enable-framework --prefix=${tcl_prefix} --libdir=${tcl_prefix}/Contents/Frameworks --bindir=${tcl_prefix}/Contents/Frameworks/Tcl.framework/bin --with-tcl=${tcl_prefix}/Contents/Frameworks/Tcl.framework
BUILD_COMMAND make -j4
INSTALL_COMMAND make install-binaries install-headers install-libraries install-private-headers
LOG_DOWNLOAD 1
LOG_BUILD 1
LOG_INSTALL 1
)
ExternalProject_Add(tkdnd
DEPENDS tcl tk
URL "http://sourceforge.net/projects/tkdnd/files/TkDND/TkDND%202.8/tkdnd2.8-src.tar.gz"
URL_MD5 a6d47a996ea957416469b12965d4db91
DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies
PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/tkdnd_macosx.patch
UPDATE_COMMAND "" # Disable update
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND ./configure --with-tcl=${CMAKE_INSTALL_PREFIX}/../Frameworks/Tcl.framework --with-tk=${CMAKE_INSTALL_PREFIX}/../Frameworks/Tk.framework --prefix=${CMAKE_INSTALL_PREFIX}/../MacOS --libdir=${CMAKE_INSTALL_PREFIX}/../MacOS
BUILD_COMMAND make
INSTALL_COMMAND make install
LOG_DOWNLOAD 1
LOG_CONFIGURE 1
LOG_BUILD 1
LOG_INSTALL 1
)
list(APPEND NETGEN_DEPENDENCIES tcl tk tkdnd)
#ExternalProject_Add(tkdnd
#DEPENDS tcl tk
#URL "http://sourceforge.net/projects/tkdnd/files/TkDND/TkDND%202.8/tkdnd2.8-src.tar.gz"
#URL_MD5 a6d47a996ea957416469b12965d4db91
#DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external_dependencies
#PATCH_COMMAND patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/tkdnd_macosx.patch
#UPDATE_COMMAND "" # Disable update
#BUILD_IN_SOURCE 1
#CONFIGURE_COMMAND ./configure --with-tcl=${CMAKE_INSTALL_PREFIX}/../Frameworks/Tcl.framework --with-tk=${CMAKE_INSTALL_PREFIX}/../Frameworks/Tk.framework --prefix=${CMAKE_INSTALL_PREFIX}/../MacOS --libdir=${CMAKE_INSTALL_PREFIX}/../MacOS
#BUILD_COMMAND make
#INSTALL_COMMAND make install
#LOG_DOWNLOAD 1
#LOG_CONFIGURE 1
#LOG_BUILD 1
#LOG_INSTALL 1
#)
list(APPEND NETGEN_DEPENDENCIES tcl tk)
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}../Frameworks)
set(TCL_INCLUDE_PATH ${CMAKE_INSTALL_PREFIX}/../Frameworks/Tcl.framework/Headers)
set(TCL_LIBRARY ${CMAKE_INSTALL_PREFIX}/../Frameworks/Tcl.framework)