Browse Source

Try fixing build errors

Panagiotis Christopoulos Charitos 3 years ago
parent
commit
bd5c85f95a
2 changed files with 6 additions and 2 deletions
  1. 2 0
      CMakeLists.txt
  2. 4 2
      ThirdParty/ZLib/CMakeLists.txt

+ 2 - 0
CMakeLists.txt

@@ -224,6 +224,8 @@ else()
 
 
 	# Full paths in compiler diagnostics else you can't click on visual studio have it open the file+line
 	# Full paths in compiler diagnostics else you can't click on visual studio have it open the file+line
 	add_compile_options("/FC")
 	add_compile_options("/FC")
+
+	add_compile_options("/std:c++17")
 endif()
 endif()
 
 
 # Use LLD or gold linker
 # Use LLD or gold linker

+ 4 - 2
ThirdParty/ZLib/CMakeLists.txt

@@ -3,8 +3,10 @@ file(GLOB_RECURSE ZLIB_HEADERS *.h)
 
 
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/)
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/)
 
 
-add_compile_definitions(USE_FILE32API)
-add_compile_options(-Wno-implicit-function-declaration)
+add_definitions(-DUSE_FILE32API)
+if(GCC OR CLANG)
+	add_compile_options(-Wno-implicit-function-declaration)
+endif()
 
 
 add_library(AnKiZLib ${ZLIB_SOURCES} ${ZLIB_HEADERS})
 add_library(AnKiZLib ${ZLIB_SOURCES} ${ZLIB_HEADERS})
 set_target_properties(AnKiZLib PROPERTIES LINKER_LANGUAGE C)
 set_target_properties(AnKiZLib PROPERTIES LINKER_LANGUAGE C)