shithub: cstory

Download patch

ref: 58d7fb2ca703fee42318598e86d9e030089b9f55
parent: 469c25c93d5b95828b4a2ac2bfb2e5a09869b7c4
author: Clownacy <Clownacy@users.noreply.github.com>
date: Fri Apr 26 01:13:50 EDT 2019

Some more CMake fixes

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -318,6 +318,12 @@
 else()
 	# Compile it ourselves
 	message(STATUS "Using local FreeType")
+	if(FORCE_LOCAL_LIBS)
+		set(CMAKE_DISABLE_FIND_PACKAGE_HarfBuzz ON)
+		set(CMAKE_DISABLE_FIND_PACKAGE_ZLIB ON)
+		set(CMAKE_DISABLE_FIND_PACKAGE_PNG ON)
+		set(CMAKE_DISABLE_FIND_PACKAGE_BZip2 ON)
+	endif()
 	add_subdirectory(external/freetype EXCLUDE_FROM_ALL)
 	target_link_libraries(CSE2 freetype)
 endif()
@@ -361,6 +367,11 @@
 	# of important functions. THAT was no fun to debug.
 	set(FLTK_LIBRARIES)
 	set(OPTION_BUILD_EXAMPLES OFF)	# Needed to prevent a name collision
+	if(FORCE_LOCAL_LIBS)
+		set(OPTION_USE_SYSTEM_ZLIB OFF)
+		set(OPTION_USE_SYSTEM_LIBJPEG OFF)
+		set(OPTION_USE_SYSTEM_LIBPNG OFF)
+	endif()
 	add_subdirectory(external/fltk EXCLUDE_FROM_ALL)
 	get_target_property(DIRS fltk INCLUDE_DIRECTORIES)	# FLTK doesn't mark its includes as PUBLIC or INTERFACE, so we have to do this stupidity
 	target_include_directories(DoConfig PRIVATE ${DIRS})