enable_testing()

if (USE_INCLUDED_SSL)
  SET(LIBRESSL_APPS OFF CACHE BOOL "" FORCE)
  SET(LIBRESSL_TESTS OFF CACHE BOOL "" FORCE)
  SET(ENABLE_ASM OFF CACHE BOOL "" FORCE)
  SET(LIBRESSL_SKIP_INSTALL ON CACHE BOOL "" FORCE)
  ADD_SUBDIRECTORY(./../Libraries/libressl ${CMAKE_CURRENT_BINARY_DIR}/libressl EXCLUDE_FROM_ALL)
  SET_TARGET_PROPERTIES(ssl PROPERTIES FOLDER LibreSSL)
  SET_TARGET_PROPERTIES(crypto PROPERTIES FOLDER LibreSSL)
  SET_TARGET_PROPERTIES(ssl_obj PROPERTIES FOLDER LibreSSL)
  SET_TARGET_PROPERTIES(crypto_obj PROPERTIES FOLDER LibreSSL)
endif()


add_definitions( -DTESTFILESPATH="${CMAKE_CURRENT_SOURCE_DIR}/TestFiles/")
add_definitions( -DLTESTFILESPATH=L"${CMAKE_CURRENT_SOURCE_DIR}/TestFiles/")
add_definitions( -DLOUTFILESPATH=L"${CMAKE_BINARY_DIR}/")
add_definitions( -DOUTFILESPATH="${CMAKE_BINARY_DIR}/")

file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Writer)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/SecureContent)

# Test the CPP-Bindings of the library
add_subdirectory(CPP_Bindings)

set(STARTUPPROJECT ${STARTUPPROJECT} PARENT_SCOPE)
