From 4c2e5818cefe3f7fb80df0cddf3c406450b1be62 Mon Sep 17 00:00:00 2001 From: Justin Carpentier Date: Sat, 15 Aug 2020 10:34:56 +0200 Subject: [PATCH 1/2] cmake: sync submodule --- .github/workflows/{build.yml => windows-conda.yml} | 0 cmake | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{build.yml => windows-conda.yml} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/windows-conda.yml similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows/windows-conda.yml diff --git a/cmake b/cmake index 69cc5ff7f..b12791b89 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 69cc5ff7fff74a2594a633461885412ea98645ea +Subproject commit b12791b89aa99c88bd24326daaa4b4add27d3a33 From 9a6a37101fb850dea00d8f67da4d2795157e3703 Mon Sep 17 00:00:00 2001 From: Justin Carpentier Date: Sat, 15 Aug 2020 10:35:15 +0200 Subject: [PATCH 2/2] cmake: use PYTHON_SITELIB --- .github/workflows/windows-conda.yml | 10 +++++++++- python/CMakeLists.txt | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows-conda.yml b/.github/workflows/windows-conda.yml index 52b9845e1..f651d9029 100644 --- a/.github/workflows/windows-conda.yml +++ b/.github/workflows/windows-conda.yml @@ -35,8 +35,16 @@ jobs: -G "NMake Makefiles" ^ -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^ -DCMAKE_BUILD_TYPE=Release ^ - -DEIGENPY_SITELIB_ROOT=%CONDA_PREFIX% ^ + -DPYTHON_SITELIB=%CONDA_PREFIX%\Lib\site-packages ^ -DPYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe ^ .. + + :: Build and Install cmake --build . --config Release --target install + + :: Testing ctest --output-on-failure -C Release -V + + :: Test Python import + cd .. + python -c "import eigenpy" diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 1b5f1cc5c..12430ef30 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -19,8 +19,8 @@ TARGET_LINK_LIBRARIES(${PYWRAP} PUBLIC ${PROJECT_NAME}) IF(NOT WIN32) TARGET_COMPILE_OPTIONS(${PYWRAP} PRIVATE "-Wno-conversion") ENDIF() -IF(EIGENPY_SITELIB_ROOT) - SET(${PYWRAP}_INSTALL_DIR ${EIGENPY_SITELIB_ROOT}/${PYTHON_SITELIB}/${PROJECT_NAME}) +IF(IS_ABSOLUTE ${PYTHON_SITELIB}) + SET(${PYWRAP}_INSTALL_DIR ${PYTHON_SITELIB}/${PROJECT_NAME}) ELSE() SET(${PYWRAP}_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/${PYTHON_SITELIB}/${PROJECT_NAME}) ENDIF()