From 9812f2fc3a493ee8afdc4f7c73ab52fc806e9fe2 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Wed, 11 Dec 2019 22:13:47 +0100 Subject: [PATCH] Corrections to build under MacOS X. --- bootstrap/builder/Builder.py | 5 +++-- bootstrap/cmake_modules/FindBootstrap.cmake | 24 +++++++++++---------- bora/src/CMakeLists.txt | 2 +- crlcore/src/ccore/lefdef/LefImport.cpp | 6 +++++- knik/src/CMakeLists.txt | 2 ++ 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/bootstrap/builder/Builder.py b/bootstrap/builder/Builder.py index 6c199377..b3240ee0 100644 --- a/bootstrap/builder/Builder.py +++ b/bootstrap/builder/Builder.py @@ -187,8 +187,8 @@ class Builder: if self._ninja: command += [ "-G", "Ninja" ] if self._macports: command += [ "-D", "WITH_MACPORTS:STRING=TRUE" ] if self._noSystemBoost: command += [ "-D", "Boost_NO_SYSTEM_PATHS:STRING=TRUE" - , "-D", "BOOST_INCLUDEDIR:STRING=/usr/include/boost169" - , "-D", "BOOST_LIBRARYDIR:STRING=/usr/lib64/boost169" + #, "-D", "BOOST_INCLUDEDIR:STRING=/usr/include/boost169" + #, "-D", "BOOST_LIBRARYDIR:STRING=/usr/lib64/boost169" ] if self._qt5: command += [ "-D", "WITH_QT5:STRING=TRUE" ] if self._openmp: command += [ "-D", "WITH_OPENMP:STRING=TRUE" ] @@ -198,6 +198,7 @@ class Builder: , "-D", "CMAKE_INSTALL_PREFIX:STRING=%s" % self.installDir , "-D", "CMAKE_INSTALL_DIR:STRING=%s" % cmakeInstallDir #, "-D", "CMAKE_MODULE_PATH:STRING=%s" % cmakeModules + #, "-D", "Boost_DEBUG:STRING=TRUE" , toolSourceDir ] if not os.path.isdir(toolBuildDir): diff --git a/bootstrap/cmake_modules/FindBootstrap.cmake b/bootstrap/cmake_modules/FindBootstrap.cmake index 94db395b..d32add12 100644 --- a/bootstrap/cmake_modules/FindBootstrap.cmake +++ b/bootstrap/cmake_modules/FindBootstrap.cmake @@ -39,6 +39,15 @@ message("-- Distribution is ${DISTRIBUTION}") endmacro(check_distribution) +# +# Specific setup for MacOS X. +# + if(WITH_MACPORTS) + set(Boost_PYVER "27") + else() + set(Boost_PYVER "") + endif() + # # Get the svn revision version and configure a svn.h.in file based on this version # The include directory name is passed as argument @@ -175,15 +184,6 @@ endmacro(hurricane_check_libraries) -# -# Find Boost, checking different versions. -# - if(WITH_MACPORTS) - set(Boost_PYVER "27") - else() - set(Boost_PYVER "") - endif() - macro(setup_boost) #set(Boost_USE_STATIC_LIBS ON) #message(STATUS "Always uses Boost static libraries.") @@ -191,7 +191,7 @@ find_package(Boost 1.35.0 REQUIRED) else(ARGC LESS 1) foreach(component ${ARGV}) - if(${component} EQUAL "python") + if(${component} STREQUAL "python") set(component ${component}${Boost_PYVER}) endif() set(components ${components} ${component}) @@ -278,11 +278,13 @@ else() find_path(QWT_INCLUDE_DIR NAMES qwt.h PATHS /usr/include/qwt-qt4 + /opt/local/libexec/qt4/include /usr/include/qt4 /usr/include PATH_SUFFIXES qwt ) find_library(QWT_LIBRARY NAMES qwt-qt4 qwt - PATHS /usr/lib${LIB_SUFFIX} ) + PATHS /opt/local/libexec/qt4/lib + /usr/lib${LIB_SUFFIX} ) endif() if( QWT_INCLUDE_DIR AND QWT_LIBRARY) diff --git a/bora/src/CMakeLists.txt b/bora/src/CMakeLists.txt index b1146693..1f7444bc 100644 --- a/bora/src/CMakeLists.txt +++ b/bora/src/CMakeLists.txt @@ -102,7 +102,7 @@ ${PYTHON_LIBRARIES} -lutil ) - add_library( bora ${cpps} ${mocCpps} ) + add_library( bora ${cpps} ${mocCpps} ${pyCpps} ) set_target_properties( bora PROPERTIES VERSION 1.0 SOVERSION 1 ) target_link_libraries( bora ${depLibs} ) diff --git a/crlcore/src/ccore/lefdef/LefImport.cpp b/crlcore/src/ccore/lefdef/LefImport.cpp index e9cf6257..6ae66891 100644 --- a/crlcore/src/ccore/lefdef/LefImport.cpp +++ b/crlcore/src/ccore/lefdef/LefImport.cpp @@ -887,7 +887,11 @@ namespace CRL { void LefImport::reset () - { LefParser::reset(); } + { +#if defined(HAVE_LEFDEF) + LefParser::reset(); +#endif + } } // End of CRL namespace. diff --git a/knik/src/CMakeLists.txt b/knik/src/CMakeLists.txt index a952177c..e88876d4 100644 --- a/knik/src/CMakeLists.txt +++ b/knik/src/CMakeLists.txt @@ -46,6 +46,7 @@ add_library ( knik ${cpps} ${mocCpps} ) set_target_properties ( knik PROPERTIES VERSION 1.0 SOVERSION 1 ) target_link_libraries ( knik ${FLUTE_LIBRARY} + ${CORIOLIS_LIBRARIES} ${HURRICANE_PYTHON_LIBRARIES} ${HURRICANE_GRAPHICAL_LIBRARIES} ${HURRICANE_LIBRARIES} @@ -53,6 +54,7 @@ ${CIF_LIBRARY} ${AGDS_LIBRARY} ${UTILITIES_LIBRARY} + ${FLUTE_LIBRARIES} ${LEFDEF_LIBRARIES} ${OA_LIBRARIES} ${QtX_LIBRARIES}