cmakeopenssldcmtk

Trying to build dcmtk with openssl


I'm trying to build dcmtk version 3.6.5 using the latest cmake GUI. I can build things fine if I don't include openssl support. When trying to build with openssl support, I get the following message:

Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.18363.
Performing Test OPENSSL_VERSION_CHECK
Performing Test OPENSSL_VERSION_CHECK - Success
Info: DCMTK OPENSSL support will be enabled
Info: DCMTK will compile with built-in (compiled-in) dictionary
Info: DCMTK will try to load external dictionary from default path on startup
Info: DCMTK's builtin private dictionary support will be disabled
Info: Thread support will be enabled
Info: Wide char file I/O functions will be enabled
Info: Wide char main function for command line tools will be disabled
Info: Building DCMTK without character set conversion support

CMake Error at CMake/CheckFunctionWithHeaderExists.cmake:16 (set):
      Syntax error in cmake code at
    
        C:/Users/SCHEFJX2/Desktop/DCMTK Conversion/3.6.5/dcmtk-3.6.5/CMake/CheckFunctionWithHeaderExists.cmake:17
    
      when parsing string
    
        -DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES};crypt32;debug;C:\openssl-1.1.1i/lib/dcmtkssl_d.lib;optimized;C:\openssl-1.1.1i/lib/dcmtkssl_o.lib;debug;C:\openssl-1.1.1i/lib/dcmtkcrypto_d.lib;optimized;C:\openssl-1.1.1i/lib/dcmtkcrypto_o.lib
    
      Invalid character escape '\o'.
    Call Stack (most recent call first):
      CMake/GenerateDCMTKConfigure.cmake:707 (CHECK_FUNCTIONWITHHEADER_EXISTS)
      CMake/dcmtkPrepare.cmake:516 (include)
      CMakeLists.txt:22 (include)

I set WITHOPENSSLINC to C:\openssl-1.1.1i I copied openssl 1.1.1 from the dcmtk 3.6.6 directory to C:\openssl-1.1.1i (I have the 3.6.6 version but I'm not allowed to use it)

Other information: Windows 10 Visual Studio 2017

Any suggestions?


Solution

  • Whoever decided that there should be two types of slashes acceptable for directory specifications and that not all programs would support both, is hopefully roasting in hell.

    The problem is that WITHOPENSSLINC must use the forward slash and not the backslash.

    Problem solved