# OpenSSL error when building with SlicerCAT bundled with SlicerJupyter on Windows

**URL:** <https://discourse.slicer.org/t/openssl-error-when-building-with-slicercat-bundled-with-slicerjupyter-on-windows/23801>\
**Category:** Development\
**Created:** [June 9, 2022, 7:47pm UTC](https://discourse.slicer.org/t/openssl-error-when-building-with-slicercat-bundled-with-slicerjupyter-on-windows/23801 "2022-06-09T19:47:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![keri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/keri/32/11618_2.png) [@keri](https://discourse.slicer.org/u/keri)\
**Post date:** [June 9, 2022, 7:47pm UTC](https://discourse.slicer.org/t/openssl-error-when-building-with-slicercat-bundled-with-slicerjupyter-on-windows/23801/1 "2022-06-09T19:47:20Z")

</div>

Hi,

During `xeus` configure step I get the following error:

```auto
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- xeus version: v2.3.1
  -- xeus binary version: v7.1.1
  -- XEUS_DISABLE_ARCH_NATIVE: OFF
  -- XEUS_BUILD_SHARED_LIBS: ON
  -- XEUS_BUILD_STATIC_LIBS: ON
  -- XEUS_STATIC_DEPENDENCIES: OFF
  -- XEUS_EMSCRIPTEN_WASM_BUILD: OFF
  -- XEUS_BUILD_TESTS: OFF
  -- XEUS_EMSCRIPTEN_WASM_TEST_BUILD: OFF
  -- Found nlohmann_json: C:/C/r/nlohmann_json-build/nlohmann_jsonConfig.cmake (found suitable version "3.8.0", minimum
   required is "3.2.0")
  -- Found OpenSSL: optimized;C:/C/r/OpenSSL-install/Release/lib/libcrypto.lib;debug;C:/C/r/OpenSSL-install/Debug/lib/l
  ibcrypto.lib
  -- tests disabled
  -- Configuring done
  CMake Error in CMakeLists.txt:
    Imported target "OpenSSL::Crypto" includes non-existent path

      "C:/C/r/OpenSSL-install/$(Configuration)/include"

    in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

    * The path was deleted, renamed, or moved to another location.

    * An install or uninstall procedure did not complete successfully.

    * The installation package was faulty and references files it does not
    provide.

```

That happens because `$(Configuration)` is unwrapped only at buildtime (or at generation time I don’t remember).  
Thus with multiconfig generators OpenSSL includes non-existent path at configure time.  
`xeus` tries to link to OpenSSL` and gives me this error.

I sligghtly modified [External\_OpenSSL.cmake](https://github.com/Slicer/Slicer/pull/6414/files) in a way that if the developper explicitely pass `-DCMAKE_BUILD_TYPE=smth` then the mentioned error doesn’t arise anymore.

I know that somebody already tried to bundle SlicerJupyter with SlicerCAT. If somebody encountered the same problem please give some hints.
