diff CMakeLists.txt @ 62:4c6dd5999b39

*: update 1. updated animia 2. use widestrings for filesystem on Windows
author Paper <mrpapersonic@gmail.com>
date Sun, 01 Oct 2023 06:16:06 -0400
parents 3c802806b74a
children 3d2decf093bb
line wrap: on
line diff
--- a/CMakeLists.txt	Fri Sep 29 15:52:31 2023 -0400
+++ b/CMakeLists.txt	Sun Oct 01 06:16:06 2023 -0400
@@ -8,22 +8,30 @@
 endif()
 
 add_subdirectory(dep/anitomy)
-add_subdirectory(dep/animia)
+# add_subdirectory(dep/animia)
 add_subdirectory(dep/pugixml)
 
 # Fix for mingw64
 list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a")
 
-find_package(Qt5 COMPONENTS Widgets REQUIRED)
+if(USE_QT6)
+	find_package(Qt6 COMPONENTS Widgets REQUIRED)
+else()
+	find_package(Qt5 COMPONENTS Widgets REQUIRED)
+endif()
 find_package(CURL REQUIRED)
 
 set(LIBRARIES
-	${Qt5Widgets_LIBRARIES}
 	${CURL_LIBRARIES}
 	anitomy
-	animia
 )
 
+if(USE_QT6)
+	list(APPEND LIBRARIES ${Qt6Widgets_LIBRARIES})
+else()
+	list(APPEND LIBRARIES ${Qt5Widgets_LIBRARIES})
+endif()
+
 # We need Cocoa for some OS X stuff
 if(APPLE)
 	find_library(COCOA_LIBRARY Cocoa)
@@ -98,7 +106,12 @@
 set_property(TARGET minori PROPERTY AUTOMOC ON)
 set_property(TARGET minori PROPERTY AUTORCC ON)
 
-target_include_directories(minori PUBLIC ${Qt5Widgets_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} PRIVATE include dep/pugixml/src)
+target_include_directories(minori PUBLIC ${CURL_INCLUDE_DIRS} PRIVATE include dep/pugixml/src dep/animia/include)
+if(USE_QT6)
+	target_include_directories(minori PUBLIC ${Qt6Widgets_INCLUDE_DIRS})
+else()
+	target_include_directories(minori PUBLIC ${Qt5Widgets_INCLUDE_DIRS})
+endif()
 target_compile_options(minori PRIVATE -Wall -Wextra -Wsuggest-override)
 if(APPLE)
 	target_compile_definitions(minori PUBLIC MACOSX)