From cd4f8560ca1081bf7e19a178d3b07226f3230a61 Mon Sep 17 00:00:00 2001 From: Robert Taylor Date: Thu, 1 Dec 2022 22:32:30 +0000 Subject: [PATCH] Fix Python linking issues --- bootstrap/cmake_modules/FindBootstrap.cmake | 3 +++ crlcore/src/LibraryManager/CMakeLists.txt | 2 +- crlcore/src/ccore/CMakeLists.txt | 24 ++++++++--------- crlcore/src/pyCRL/CMakeLists.txt | 26 +++++++++++-------- crlcore/src/x2y/CMakeLists.txt | 3 +-- deprecated/knik/src/CMakeLists.txt | 2 +- deprecated/nimbus/src/CMakeLists.txt | 2 +- .../examples/liberty/cplusplus/CMakeLists.txt | 4 +-- .../vlsisapd/src/agds/src/CMakeLists.txt | 2 +- .../vlsisapd/src/bookshelf/src/CMakeLists.txt | 2 +- .../vlsisapd/src/cif/src/CMakeLists.txt | 2 +- .../src/configuration/src/CMakeLists.txt | 4 +-- .../vlsisapd/src/dtr/src/CMakeLists.txt | 2 +- .../vlsisapd/src/liberty/src/CMakeLists.txt | 2 +- .../vlsisapd/src/spice/src/CMakeLists.txt | 2 +- .../code/engine/smurf/src/CMakeLists.txt | 2 +- equinox/src/CMakeLists.txt | 2 +- hurricane/cmake_modules/FindHURRICANE.cmake | 3 +++ hurricane/src/configuration/CMakeLists.txt | 4 +-- hurricane/src/isobar/CMakeLists.txt | 2 +- hurricane/src/viewer/CMakeLists.txt | 1 + ispd/src/CMakeLists.txt | 2 +- mauka/src/CMakeLists.txt | 2 +- metis/src/CMakeLists.txt | 2 +- solstice/src/CMakeLists.txt | 2 +- 25 files changed, 57 insertions(+), 47 deletions(-) diff --git a/bootstrap/cmake_modules/FindBootstrap.cmake b/bootstrap/cmake_modules/FindBootstrap.cmake index 5000f621..a8b7e7b7 100644 --- a/bootstrap/cmake_modules/FindBootstrap.cmake +++ b/bootstrap/cmake_modules/FindBootstrap.cmake @@ -7,6 +7,9 @@ if(COMMAND CMAKE_POLICY) cmake_policy(SET CMP0003 NEW) cmake_policy(SET CMP0005 NEW) + cmake_policy(SET CMP0079 NEW) + cmake_policy(SET CMP0022 NEW) + cmake_policy(SET CMP0060 NEW) #if(NOT (CMAKE_VERSION VERSION_LESS 2.8.0)) # cmake_policy(SET CMP0014 OLD) #endif() diff --git a/crlcore/src/LibraryManager/CMakeLists.txt b/crlcore/src/LibraryManager/CMakeLists.txt index 64fabf2c..a2cabb52 100644 --- a/crlcore/src/LibraryManager/CMakeLists.txt +++ b/crlcore/src/LibraryManager/CMakeLists.txt @@ -49,7 +49,7 @@ # ${QtX_LIBRARIES} # ${Boost_LIBRARIES} # ${LIBXML2_LIBRARIES} -# ${PYTHON_LIBRARIES} -lutil +# ${Python_LIBRARIES} -lutil # ) install( TARGETS libmanager DESTINATION lib${LIB_SUFFIX} ) diff --git a/crlcore/src/ccore/CMakeLists.txt b/crlcore/src/ccore/CMakeLists.txt index 122f1593..858d040b 100644 --- a/crlcore/src/ccore/CMakeLists.txt +++ b/crlcore/src/ccore/CMakeLists.txt @@ -303,18 +303,18 @@ ${openaccess_cpps} ) set_target_properties ( crlcore PROPERTIES VERSION 1.0 SOVERSION 1 ) -# target_link_libraries ( crlcore ${HURRICANE_PYTHON_NEW_LIBRARIES} -# ${HURRICANE_PYTHON_LIBRARIES} -# ${HURRICANE_GRAPHICAL_LIBRARIES} -# ${HURRICANE_LIBRARIES} -# ${BOOKSHELF_LIBRARY} -# ${LEFDEF_LIBRARIES} -# ${OA_LIBRARIES} -# ${QtX_LIBRARIES} -# ${Boost_LIBRARIES} -# ${LIBXML2_LIBRARIES} -# ${PYTHON_LIBRARIES} -lutil -# ) + target_link_libraries ( crlcore ${HURRICANE_PYTHON_NEW_LIBRARIES} + ${HURRICANE_PYTHON_LIBRARIES} + ${HURRICANE_GRAPHICAL_LIBRARIES} + ${HURRICANE_LIBRARIES} + ${BOOKSHELF_LIBRARY} + ${LEFDEF_LIBRARIES} + ${OA_LIBRARIES} + ${QtX_LIBRARIES} + ${Boost_LIBRARIES} + ${LIBXML2_LIBRARIES} + ${Python_LIBRARIES} -lutil + ) install ( TARGETS crlcore DESTINATION lib${LIB_SUFFIX} ) install ( FILES ${includes} ${mocincludes} DESTINATION include/coriolis2/crlcore ) diff --git a/crlcore/src/pyCRL/CMakeLists.txt b/crlcore/src/pyCRL/CMakeLists.txt index 1ca6e829..51e2c845 100644 --- a/crlcore/src/pyCRL/CMakeLists.txt +++ b/crlcore/src/pyCRL/CMakeLists.txt @@ -21,6 +21,17 @@ ${Boost_INCLUDE_DIR} ${QtX_INCLUDE_DIRS} ) + set (LINK_LIBS ${HURRICANE_PYTHON_NEW_LIBRARIES} + ${HURRICANE_PYTHON_LIBRARIES} + ${HURRICANE_GRAPHICAL_LIBRARIES} + ${HURRICANE_LIBRARIES} + ${BOOKSHELF_LIBRARY} + ${OA_LIBRARIES} + ${Boost_LIBRARIES} + ${LIBXML2_LIBRARIES} + ${Python_LIBRARIES} -lutil + ) + add_definitions( -DCORIOLIS_TOP="${CORIOLIS_TOP}" -DSYS_CONF_DIR="${SYS_CONF_DIR}" @@ -77,16 +88,7 @@ crlcore/PyLefExport.h crlcore/PyDefExport.h ) -# target_link_libraries ( crlcore ${HURRICANE_PYTHON_NEW_LIBRARIES} -# ${HURRICANE_PYTHON_LIBRARIES} -# ${HURRICANE_GRAPHICAL_LIBRARIES} -# ${HURRICANE_LIBRARIES} -# ${BOOKSHELF_LIBRARY} -# ${OA_LIBRARIES} -# ${Boost_LIBRARIES} -# ${LIBXML2_LIBRARIES} -# ${PYTHON_LIBRARIES} -lutil -# ) + target_link_libraries ( crlcore ${LINK_LIBS} ) set( depLibs crlcore ${HURRICANE_GRAPHICAL_LIBRARIES} @@ -94,7 +96,7 @@ ${HURRICANE_PYTHON_LIBRARIES} ${HURRICANE_LIBRARIES} ${LEFDEF_LIBRARIES} - ${PYTHON_LIBRARIES} + ${Python_LIBRARIES} ${QtX_LIBRARIES} -lutil ) @@ -106,6 +108,7 @@ "${depLibs}" include/coriolis2/crlcore ) + add_python_module( "${pyConstCpps}" "crlcore/PyRoutingLayerGauge.h" "pycrlconst;1.0;1" @@ -113,3 +116,4 @@ "${depLibs}" include/coriolis2/crlcore ) + diff --git a/crlcore/src/x2y/CMakeLists.txt b/crlcore/src/x2y/CMakeLists.txt index 674f4b7e..60807fd7 100644 --- a/crlcore/src/x2y/CMakeLists.txt +++ b/crlcore/src/x2y/CMakeLists.txt @@ -1,5 +1,5 @@ # -*- explicit-buffer-name: "CMakeLists.txt -*- - + include_directories ( ${CRLCORE_SOURCE_DIR}/src/ccore ${HURRICANE_INCLUDE_DIR} ${UTILITIES_INCLUDE_DIR} @@ -26,6 +26,5 @@ ${BZIP2_LIBRARIES} ${LIBEXECINFO_LIBRARIES} ${LIBBFD_LIBRARIES} - z ) install ( TARGETS cx2y DESTINATION bin ) diff --git a/deprecated/knik/src/CMakeLists.txt b/deprecated/knik/src/CMakeLists.txt index aab3eab6..50f9b738 100644 --- a/deprecated/knik/src/CMakeLists.txt +++ b/deprecated/knik/src/CMakeLists.txt @@ -60,7 +60,7 @@ # ${QtX_LIBRARIES} # ${Boost_LIBRARIES} # ${LIBXML2_LIBRARIES} -# ${PYTHON_LIBRARIES} -lutil +# ${Python_LIBRARIES} -lutil # ) install ( TARGETS knik DESTINATION lib${LIB_SUFFIX} ) diff --git a/deprecated/nimbus/src/CMakeLists.txt b/deprecated/nimbus/src/CMakeLists.txt index 332ef769..280bf983 100644 --- a/deprecated/nimbus/src/CMakeLists.txt +++ b/deprecated/nimbus/src/CMakeLists.txt @@ -57,7 +57,7 @@ # ${QtX_LIBRARIES} # ${Boost_LIBRARIES} # ${LIBXML2_LIBRARIES} -# ${PYTHON_LIBRARIES} -lutil +# ${Python_LIBRARIES} -lutil # ) add_library ( pyNimbus MODULE ${pyCpps} ) diff --git a/deprecated/vlsisapd/examples/liberty/cplusplus/CMakeLists.txt b/deprecated/vlsisapd/examples/liberty/cplusplus/CMakeLists.txt index 969c9ea7..808e5010 100644 --- a/deprecated/vlsisapd/examples/liberty/cplusplus/CMakeLists.txt +++ b/deprecated/vlsisapd/examples/liberty/cplusplus/CMakeLists.txt @@ -1,7 +1,7 @@ INCLUDE_DIRECTORIES ( ${VLSISAPD_SOURCE_DIR}/src/liberty/src ) ADD_EXECUTABLE ( driveLiberty driveLiberty.cpp ) ADD_EXECUTABLE ( parseLiberty parseLiberty.cpp ) -TARGET_LINK_LIBRARIES ( driveLiberty liberty ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} ) -TARGET_LINK_LIBRARIES ( parseLiberty liberty ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} ) +TARGET_LINK_LIBRARIES ( driveLiberty liberty ${Boost_LIBRARIES} ${Python_LIBRARIES} ) +TARGET_LINK_LIBRARIES ( parseLiberty liberty ${Boost_LIBRARIES} ${Python_LIBRARIES} ) INSTALL ( TARGETS driveLiberty DESTINATION share/doc/coriolis2/examples/vlsisapd/liberty ) INSTALL ( TARGETS parseLiberty DESTINATION share/doc/coriolis2/examples/vlsisapd/liberty ) diff --git a/deprecated/vlsisapd/src/agds/src/CMakeLists.txt b/deprecated/vlsisapd/src/agds/src/CMakeLists.txt index b2157df8..bb90f9fc 100644 --- a/deprecated/vlsisapd/src/agds/src/CMakeLists.txt +++ b/deprecated/vlsisapd/src/agds/src/CMakeLists.txt @@ -24,7 +24,7 @@ IF(Boost_FOUND) OUTPUT_NAME "AGDS" PREFIX "" ) - TARGET_LINK_LIBRARIES(pyAGDS agds ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) + TARGET_LINK_LIBRARIES(pyAGDS agds ${Boost_LIBRARIES} ${Python_LIBRARIES}) INSTALL(TARGETS pyAGDS DESTINATION ${PYTHON_SITE_PACKAGES}) ENDIF(Boost_FOUND) diff --git a/deprecated/vlsisapd/src/bookshelf/src/CMakeLists.txt b/deprecated/vlsisapd/src/bookshelf/src/CMakeLists.txt index a4d02827..0419802f 100644 --- a/deprecated/vlsisapd/src/bookshelf/src/CMakeLists.txt +++ b/deprecated/vlsisapd/src/bookshelf/src/CMakeLists.txt @@ -27,7 +27,7 @@ #target_link_libraries ( bookshelf vlsisapdutils ) set_target_properties ( bookshelf PROPERTIES VERSION 1.0 SOVERSION 1 ) add_executable ( bookshelf-tk ${testcpps} ) - target_link_libraries ( bookshelf-tk bookshelf ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) + target_link_libraries ( bookshelf-tk bookshelf ${Boost_LIBRARIES} ${Python_LIBRARIES}) install ( TARGETS bookshelf DESTINATION lib${LIB_SUFFIX} ) install ( TARGETS bookshelf-tk DESTINATION bin ) diff --git a/deprecated/vlsisapd/src/cif/src/CMakeLists.txt b/deprecated/vlsisapd/src/cif/src/CMakeLists.txt index be8ed307..ebd42a2a 100644 --- a/deprecated/vlsisapd/src/cif/src/CMakeLists.txt +++ b/deprecated/vlsisapd/src/cif/src/CMakeLists.txt @@ -21,7 +21,7 @@ IF(Boost_FOUND) OUTPUT_NAME "CIF" PREFIX "" ) - TARGET_LINK_LIBRARIES(pyCIF cif ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) + TARGET_LINK_LIBRARIES(pyCIF cif ${Boost_LIBRARIES} ${Python_LIBRARIES}) INSTALL(TARGETS pyCIF DESTINATION ${PYTHON_SITE_PACKAGES}) ENDIF(Boost_FOUND) diff --git a/deprecated/vlsisapd/src/configuration/src/CMakeLists.txt b/deprecated/vlsisapd/src/configuration/src/CMakeLists.txt index 7ef8a581..15b7d7f6 100644 --- a/deprecated/vlsisapd/src/configuration/src/CMakeLists.txt +++ b/deprecated/vlsisapd/src/configuration/src/CMakeLists.txt @@ -43,7 +43,7 @@ set_target_properties ( configuration PROPERTIES VERSION 1.0 SOVERSION 1 ) #target_link_libraries ( configuration vlsisapdutils # ${QtX_LIBRARIES} -# ${PYTHON_LIBRARIES} +# ${Python_LIBRARIES} # ${LIBXML2_LIBRARIES} # ${Boost_LIBRARIES} # ) @@ -55,7 +55,7 @@ PREFIX "" ) #target_link_libraries ( pyConfiguration configuration -# ${PYTHON_LIBRARIES} +# ${Python_LIBRARIES} # ${LIBXML2_LIBRARIES} # ${Boost_LIBRARIES} # ) diff --git a/deprecated/vlsisapd/src/dtr/src/CMakeLists.txt b/deprecated/vlsisapd/src/dtr/src/CMakeLists.txt index 4a1f18bc..23c16e06 100644 --- a/deprecated/vlsisapd/src/dtr/src/CMakeLists.txt +++ b/deprecated/vlsisapd/src/dtr/src/CMakeLists.txt @@ -22,7 +22,7 @@ IF (Boost_FOUND) OUTPUT_NAME "DTR" PREFIX "" ) - TARGET_LINK_LIBRARIES(pyDTR dtr ${LIBXML2_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) + TARGET_LINK_LIBRARIES(pyDTR dtr ${LIBXML2_LIBRARIES} ${Boost_LIBRARIES} ${Python_LIBRARIES}) INSTALL(TARGETS pyDTR DESTINATION ${PYTHON_SITE_PACKAGES}) ENDIF(Boost_FOUND) diff --git a/deprecated/vlsisapd/src/liberty/src/CMakeLists.txt b/deprecated/vlsisapd/src/liberty/src/CMakeLists.txt index 4829fcd3..b6ad7cb0 100644 --- a/deprecated/vlsisapd/src/liberty/src/CMakeLists.txt +++ b/deprecated/vlsisapd/src/liberty/src/CMakeLists.txt @@ -66,6 +66,6 @@ if ( Boost_FOUND ) OUTPUT_NAME "LIBERTY" PREFIX "" ) -# target_link_libraries ( pyLIBERTY liberty ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} ) +# target_link_libraries ( pyLIBERTY liberty ${Boost_LIBRARIES} ${Python_LIBRARIES} ) install ( TARGETS pyLIBERTY DESTINATION ${PYTHON_SITE_PACKAGES} ) endif ( Boost_FOUND ) diff --git a/deprecated/vlsisapd/src/spice/src/CMakeLists.txt b/deprecated/vlsisapd/src/spice/src/CMakeLists.txt index 713beeee..53681466 100644 --- a/deprecated/vlsisapd/src/spice/src/CMakeLists.txt +++ b/deprecated/vlsisapd/src/spice/src/CMakeLists.txt @@ -27,7 +27,7 @@ IF(Boost_FOUND) OUTPUT_NAME "SPICE" PREFIX "" ) - TARGET_LINK_LIBRARIES(pySPICE spice ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) + TARGET_LINK_LIBRARIES(pySPICE spice ${Boost_LIBRARIES} ${Python_LIBRARIES}) INSTALL(TARGETS pySPICE DESTINATION ${PYTHON_SITE_PACKAGES}) ENDIF(Boost_FOUND) diff --git a/documentation/examples/code/engine/smurf/src/CMakeLists.txt b/documentation/examples/code/engine/smurf/src/CMakeLists.txt index 3a8c2275..d639c630 100644 --- a/documentation/examples/code/engine/smurf/src/CMakeLists.txt +++ b/documentation/examples/code/engine/smurf/src/CMakeLists.txt @@ -44,7 +44,7 @@ ${QtX_LIBRARIES} ${Boost_LIBRARIES} ${LIBXML2_LIBRARIES} - ${PYTHON_LIBRARIES} -lutil + ${Python_LIBRARIES} -lutil ${LIBEXECINFO_LIBRARIES} ) diff --git a/equinox/src/CMakeLists.txt b/equinox/src/CMakeLists.txt index a22a7792..d2f22a47 100644 --- a/equinox/src/CMakeLists.txt +++ b/equinox/src/CMakeLists.txt @@ -57,7 +57,7 @@ # ${QtX_LIBRARIES} # ${Boost_LIBRARIES} # ${LIBXML2_LIBRARIES} -# ${PYTHON_LIBRARIES} -lutil +# ${Python_LIBRARIES} -lutil # ) install ( TARGETS equinox intervalTree DESTINATION lib${LIB_SUFFIX} ) diff --git a/hurricane/cmake_modules/FindHURRICANE.cmake b/hurricane/cmake_modules/FindHURRICANE.cmake index b61fc4bd..cf0aba55 100644 --- a/hurricane/cmake_modules/FindHURRICANE.cmake +++ b/hurricane/cmake_modules/FindHURRICANE.cmake @@ -137,6 +137,9 @@ IF(UNIX) SET_LIBRARIES_PATH(HURRICANE_PYTHON_NEW HURRICANE_PYTHON_NEW) SET_LIBRARIES_PATH(HURRICANE_GRAPHICAL HURRICANE_VIEWER) + set(HURRICANE_PYTHON_INTERFACE_LINK_LIBRARIES "${Boost_LIBRARIES} ${BZIP2_LIBRARIES} ${LIBBFD_LIBRARIES}" ) + + HURRICANE_CHECK_LIBRARIES(HURRICANE ) HURRICANE_CHECK_LIBRARIES(HURRICANE_PYTHON_NEW ${HURRICANE_FIND_REQUIRED}) HURRICANE_CHECK_LIBRARIES(HURRICANE_PYTHON ${HURRICANE_FIND_REQUIRED}) diff --git a/hurricane/src/configuration/CMakeLists.txt b/hurricane/src/configuration/CMakeLists.txt index 09bd0170..718c6d3a 100644 --- a/hurricane/src/configuration/CMakeLists.txt +++ b/hurricane/src/configuration/CMakeLists.txt @@ -91,14 +91,14 @@ add_python_module3( "${pyCfgCpps}" "${pyCfgIncludes}" Cfg - "pytypemanager;configuration;hurricane;${QtX_LIBRARIES};${PYTHON_LIBRARIES}" + "pytypemanager;configuration;hurricane;${QtX_LIBRARIES};${Python_LIBRARIES}" include/coriolis2/hurricane/configuration ) add_python_module3( "${pyHurricane3Cpps}" "${pyHurricane3Includes}" Hurricane3 - "pytypemanager;configuration;hurricane;${PYTHON_LIBRARIES}" + "pytypemanager;configuration;hurricane;${Python_LIBRARIES}" include/coriolis2/hurricane/configuration ) diff --git a/hurricane/src/isobar/CMakeLists.txt b/hurricane/src/isobar/CMakeLists.txt index d71e12c1..a1ee8cbb 100644 --- a/hurricane/src/isobar/CMakeLists.txt +++ b/hurricane/src/isobar/CMakeLists.txt @@ -168,7 +168,7 @@ set( depLibs hurricane ${Boost_LIBRARIES} - ${PYTHON_LIBRARIES} + ${Python_LIBRARIES} ) add_python_module( "${pyCpps}" diff --git a/hurricane/src/viewer/CMakeLists.txt b/hurricane/src/viewer/CMakeLists.txt index c7093a4e..360435d6 100644 --- a/hurricane/src/viewer/CMakeLists.txt +++ b/hurricane/src/viewer/CMakeLists.txt @@ -150,6 +150,7 @@ ${UTILITIES_LIBRARY} ${LIBXML2_LIBRARIES} ${QtX_LIBRARIES} + ${Python_LIBRARIES} ) add_library( viewer ${cpps} ${MOC_SRCS} ${RCC_SRCS} ${pyCpps} ) diff --git a/ispd/src/CMakeLists.txt b/ispd/src/CMakeLists.txt index 2bbe7a5d..a6b7a6cd 100644 --- a/ispd/src/CMakeLists.txt +++ b/ispd/src/CMakeLists.txt @@ -33,7 +33,7 @@ ${LEFDEF_LIBRARIES} ${QT_LIBRARIES} ${Boost_LIBRARIES} - ${PYTHON_LIBRARIES} + ${Python_LIBRARIES} -lutil ${LIBXML2_LIBRARIES} ) diff --git a/mauka/src/CMakeLists.txt b/mauka/src/CMakeLists.txt index 49965802..756c97d1 100644 --- a/mauka/src/CMakeLists.txt +++ b/mauka/src/CMakeLists.txt @@ -64,7 +64,7 @@ # ${QtX_LIBRARIES} # ${Boost_LIBRARIES} # ${LIBXML2_LIBRARIES} -# ${PYTHON_LIBRARIES} -lutil +# ${Python_LIBRARIES} -lutil # ) add_library ( pyMauka MODULE ${pyCpps} ) diff --git a/metis/src/CMakeLists.txt b/metis/src/CMakeLists.txt index a92022b0..7b5ac96c 100644 --- a/metis/src/CMakeLists.txt +++ b/metis/src/CMakeLists.txt @@ -44,7 +44,7 @@ endif ( HMETIS_FOUND ) # ${QT_LIBRARIES} # ${Boost_LIBRARIES} # ${LIBXML2_LIBRARIES} -# ${PYTHON_LIBRARIES} -lutil +# ${Python_LIBRARIES} -lutil # ) add_library ( pyMetis MODULE ${pyCpps} ) diff --git a/solstice/src/CMakeLists.txt b/solstice/src/CMakeLists.txt index 0c939f92..dd041148 100644 --- a/solstice/src/CMakeLists.txt +++ b/solstice/src/CMakeLists.txt @@ -55,7 +55,7 @@ # ${QtX_LIBRARIES} # ${Boost_LIBRARIES} # ${LIBXML2_LIBRARIES} -# ${PYTHON_LIBRARIES} -lutil +# ${Python_LIBRARIES} -lutil # ) install ( TARGETS solstice DESTINATION lib${LIB_SUFFIX} )