From 0660cab00975eb3ba70ed209da30ba97addae777 Mon Sep 17 00:00:00 2001 From: Naohiko Shimizu Date: Tue, 14 Mar 2023 18:40:28 +0900 Subject: [PATCH] cygwin compile#51 --- bootstrap/cmake_modules/FindQwt.cmake | 4 ++-- bootstrap/coriolisEnv.py | 9 ++++++++- bora/src/CMakeLists.txt | 4 ++++ tutorial/src/CMakeLists.txt | 2 ++ unicorn/src/CMakeLists.txt | 2 ++ 5 files changed, 18 insertions(+), 3 deletions(-) diff --git a/bootstrap/cmake_modules/FindQwt.cmake b/bootstrap/cmake_modules/FindQwt.cmake index 4e30db80..ea6f7867 100644 --- a/bootstrap/cmake_modules/FindQwt.cmake +++ b/bootstrap/cmake_modules/FindQwt.cmake @@ -18,10 +18,10 @@ FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS /usr/local/include "$ENV{LIB_DIR}/include" "$ENV{INCLUDE}" - PATH_SUFFIXES qwt-qt4 qwt qwt5 + PATH_SUFFIXES qwt-qt4 qwt qwt5 qt4 ) -FIND_LIBRARY(QWT_LIBRARY NAMES qwt qwt5 qwt-qt4 qwt5-qt4 PATHS +FIND_LIBRARY(QWT_LIBRARY NAMES qwt qt4 qwt5 qwt-qt4 qwt5-qt4 PATHS /usr/lib /usr/local/lib "$ENV{LIB_DIR}/lib" diff --git a/bootstrap/coriolisEnv.py b/bootstrap/coriolisEnv.py index 259f6c33..1deb0e40 100755 --- a/bootstrap/coriolisEnv.py +++ b/bootstrap/coriolisEnv.py @@ -159,7 +159,14 @@ def guessShell ( forcedShell ): if shellName is None: try: psResult = subprocess.run( ['ps', '-p', str(os.getppid()) ], capture_output=True, check=True ) - shell = psResult.stdout.splitlines()[1].decode('utf8').split()[3].lstrip('-') + cmdnom = psResult.stdout.splitlines()[0].decode('utf8').split() + if "CMD" in cmdnom: + cmdidx = cmdnom.index("CMD") + elif "COMMAND" in cmdnom: + cmdidx = cmdnom.index("COMMAND") + else: + cmdidx = 3 + shell = psResult.stdout.splitlines()[1].decode('utf8').split()[cmdidx].lstrip('-') whichCommand = subprocess.run( ['which', shell ], capture_output=True, check=True ) shellPath = whichCommand.stdout.splitlines()[0].decode('utf8') except Exception: diff --git a/bora/src/CMakeLists.txt b/bora/src/CMakeLists.txt index ef64c135..a4577720 100644 --- a/bora/src/CMakeLists.txt +++ b/bora/src/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- explicit-buffer-name: "CMakeLists.txt" -*- + find_package (Qwt REQUIRED) include_directories( ${BORA_SOURCE_DIR}/src ${ANABATIC_INCLUDE_DIR} ${KATANA_INCLUDE_DIR} @@ -83,6 +84,7 @@ PyBora.cpp ) qtX_wrap_cpp( mocCpps ${mocIncludes} ) + find_package (Python3 COMPONENTS Interpreter Development) set( depLibs ${KATANA_LIBRARIES} ${ANABATIC_LIBRARIES} @@ -99,7 +101,9 @@ ${LEFDEF_LIBRARIES} ${OA_LIBRARIES} ${QWT_LIBRARY} + ${QT_LIBRARIES} ${QtX_LIBRARIES} + ${Python3_LIBRARIES} ${Boost_LIBRARIES} -lutil ) diff --git a/tutorial/src/CMakeLists.txt b/tutorial/src/CMakeLists.txt index 2b04d79b..baf52b1c 100644 --- a/tutorial/src/CMakeLists.txt +++ b/tutorial/src/CMakeLists.txt @@ -24,6 +24,7 @@ PyGraphicTutorialEngine.cpp ) qtX_wrap_cpp( mocCpps ${mocIncludes} ) + find_package (Python3 COMPONENTS Interpreter Development) set( depLibs ${CORIOLIS_PYTHON_LIBRARIES} ${CORIOLIS_LIBRARIES} @@ -40,6 +41,7 @@ ${QtX_LIBRARIES} ${Boost_LIBRARIES} ${LIBXML2_LIBRARIES} + ${Python3_LIBRARIES} -lutil ${LIBEXECINFO_LIBRARIES} ) diff --git a/unicorn/src/CMakeLists.txt b/unicorn/src/CMakeLists.txt index 872a3307..533cfc94 100644 --- a/unicorn/src/CMakeLists.txt +++ b/unicorn/src/CMakeLists.txt @@ -44,6 +44,7 @@ qtX_wrap_cpp( mocCpps ${mocincludes} ) qtX_add_resources( RCC_SRCS Unicorn.qrc ) + find_package (Python3 COMPONENTS Interpreter Development) set( depLibs ${SOLSTICE_GRAPHICAL_LIBRARIES} ${SOLSTICE_LIBRARIES} @@ -76,6 +77,7 @@ ${LEFDEF_LIBRARIES} ${OA_LIBRARIES} ${QtX_LIBRARIES} + ${Python3_LIBRARIES} ${Boost_LIBRARIES} -lutil