Fixed windows

This commit is contained in:
WolverinDEV 2019-07-07 12:36:27 +02:00
parent ea092a66ed
commit 225c4d3252
3 changed files with 10 additions and 25 deletions

View File

@ -6,6 +6,11 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_VERBOSE_MAKEFILE ON) set(CMAKE_VERBOSE_MAKEFILE ON)
if (CMAKE_INCLUDE_FILE AND NOT CMAKE_INCLUDE_FILE STREQUAL "")
message("Include file ${CMAKE_INCLUDE_FILE}")
include("${CMAKE_INCLUDE_FILE}")
endif ()
if(CMAKE_PLATFORM_INCLUDE AND NOT CMAKE_PLATFORM_INCLUDE STREQUAL "") if(CMAKE_PLATFORM_INCLUDE AND NOT CMAKE_PLATFORM_INCLUDE STREQUAL "")
message("Include file ${CMAKE_PLATFORM_INCLUDE}") message("Include file ${CMAKE_PLATFORM_INCLUDE}")
include("${CMAKE_PLATFORM_INCLUDE}") include("${CMAKE_PLATFORM_INCLUDE}")
@ -102,8 +107,6 @@ if (MSVC)
foreach(CompilerFlag ${CompilerFlags}) foreach(CompilerFlag ${CompilerFlags})
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
endforeach() endforeach()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
else() else()
#This is a bad thing here! #This is a bad thing here!
function(resolve_library VARIABLE FALLBACK PATHS) function(resolve_library VARIABLE FALLBACK PATHS)
@ -142,7 +145,7 @@ build_update_installer()
function(build_codec) function(build_codec)
add_subdirectory(codec) add_subdirectory(codec)
endfunction() endfunction()
build_codec() #build_codec()
function(build_ppt) function(build_ppt)
add_subdirectory(ppt) add_subdirectory(ppt)

View File

@ -1,20 +1,5 @@
set(MODULE_NAME "teaclient_connection") set(MODULE_NAME "teaclient_connection")
function(resolve_codecs)
# if(EXISTS "${CMAKE_MODULE_DIR}/libraries/generated/opus/include" AND EXISTS ${OPUS_LIBRARY_PATH})
# set(HAVE_OPUS ON)
#
# add_definitions(-DHAVE_OPUS)
# include_directories(${CMAKE_MODULE_DIR}/libraries/generated/opus/include)
# target_link_libraries(${MODULE_NAME} ${OPUS_LIBRARY_PATH})
# else()
# message(WARNING "Missing opus libraries. Building without opus support!\n" "Build opus with the build script given within the libraries foulder")
# endif()
add_definitions(-DHAVE_CODEC_OPUS)
endfunction()
resolve_codecs()
set(SOURCE_FILES set(SOURCE_FILES
src/logger.cpp src/logger.cpp
src/EventLoop.cpp src/EventLoop.cpp
@ -153,7 +138,3 @@ target_compile_definitions(${MODULE_NAME} PUBLIC -DNODEJS_API)
add_executable(Audio-Test ${SOURCE_FILES} test/audio/main.cpp) add_executable(Audio-Test ${SOURCE_FILES} test/audio/main.cpp)
target_link_libraries(Audio-Test ${REQUIRED_LIBRARIES}) target_link_libraries(Audio-Test ${REQUIRED_LIBRARIES})
#U SHA512_Final
#U SHA512_Init
#U SHA512_Update

View File

@ -51,9 +51,10 @@ void testTomMath(){
mp_int r{}; mp_int r{};
mp_init(&r); mp_init(&r);
if(mp_exptmod(&x, &exp, &n, &r) != CRYPT_OK) { if(mp_exptmod(&x, &exp, &n, &r) == CRYPT_OK) {
Nan::ThrowError("Tomcrypt library is too modern. Use an oder one!"); log_warn(category::general, tr("TomCrypt check failed. Server connects main fail due to this mistake!"));
return; //Nan::ThrowError("Tomcrypt library is too modern. Use an oder one!");
//return;
} }
//assert(mp_exptmod(&x, &exp, &n, &r) != CRYPT_OK); //if this method succeed than tommath failed. Unknown why but it is so //assert(mp_exptmod(&x, &exp, &n, &r) != CRYPT_OK); //if this method succeed than tommath failed. Unknown why but it is so