diff options
author | Julien Schueller <schueller@phimeca.com> | 2022-10-26 09:25:04 +0200 |
---|---|---|
committer | Julien Schueller <schueller@phimeca.com> | 2022-10-26 09:25:14 +0200 |
commit | 96f2235d6de942f87cfc49ff9962a54b58dd99d5 (patch) | |
tree | a4c081366441612bdce18f013a78a0e8137cfb10 /CMakeLists.txt | |
parent | 38c2c15e61d8f4c59d0477bad4548045f7f5916f (diff) | |
download | swig-96f2235d6de942f87cfc49ff9962a54b58dd99d5.tar.gz |
CMake: Fix -swiglib on win32
- swig library files must be installed relatively to the exe into PREFIX/bin/Lib
- unset SWIG_LIB_WIN_UNIX else swiglib returns a list of 2 paths which
break cmake detection (and consistent to the provided windows binaries)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7303f4cff..6298b62d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,8 +20,11 @@ endif () set (SWIG_ROOT ${PROJECT_SOURCE_DIR}) -set (SWIG_LIB share/swig/${SWIG_VERSION}) - +if (WIN32) + set (SWIG_LIB bin/Lib) +else () + set (SWIG_LIB share/swig/${SWIG_VERSION}) +endif () # Project wide configuration variables # ------------------------------------ @@ -80,10 +83,10 @@ if (WITH_PCRE) include_directories (${PCRE2_INCLUDE_DIRS}) endif() -if (WIN32) - file (TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/${SWIG_LIB} SWIG_LIB_WIN_UNIX) - string (REGEX REPLACE "\\\\" "\\\\\\\\" SWIG_LIB_WIN_UNIX "${SWIG_LIB_WIN_UNIX}") -endif () +#if (WIN32) +# file (TO_NATIVE_PATH ${CMAKE_INSTALL_PREFIX}/${SWIG_LIB} SWIG_LIB_WIN_UNIX) +# string (REGEX REPLACE "\\\\" "\\\\\\\\" SWIG_LIB_WIN_UNIX "${SWIG_LIB_WIN_UNIX}") +#endif () configure_file (${SWIG_ROOT}/Tools/cmake/swigconfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/Source/Include/swigconfig.h) |