# HG changeset patch # User Paper # Date 1695094811 14400 # Node ID cf6a73a5ba1c2852c45e642461cf4c22fc41a397 # Parent fc1bf97c528b64c848a24888b5ba786bd5605172 cmake: fix for mingw diff -r fc1bf97c528b -r cf6a73a5ba1c CMakeLists.txt --- a/CMakeLists.txt Sun Sep 17 06:14:30 2023 -0400 +++ b/CMakeLists.txt Mon Sep 18 23:40:11 2023 -0400 @@ -3,6 +3,24 @@ add_subdirectory(dep/anitomy) +# Fix for mingw64 +list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".a") + +find_package(Qt5 COMPONENTS Widgets REQUIRED) +find_package(CURL REQUIRED) + +set(LIBRARIES + ${Qt5Widgets_LIBRARIES} + ${CURL_LIBRARIES} + anitomy +) + +# We need Cocoa for some OS X stuff +if(APPLE) + find_library(COCOA_LIBRARY Cocoa) + list(APPEND LIBRARIES ${COCOA_LIBRARY}) +endif() + set(SRC_FILES # Main entrypoint src/main.cpp @@ -55,26 +73,11 @@ endif() add_executable(minori ${SRC_FILES}) -set_property(TARGET minori PROPERTY CXX_STANDARD 11) +set_property(TARGET minori PROPERTY CXX_STANDARD 20) set_property(TARGET minori PROPERTY AUTOMOC ON) set_property(TARGET minori PROPERTY AUTORCC ON) -find_package(Qt5 COMPONENTS Widgets Test REQUIRED) -find_package(CURL REQUIRED) - -set(LIBRARIES - ${Qt5Widgets_LIBRARIES} - ${Qt5Test_LIBRARIES} - ${CURL_LIBRARIES} - anitomy -) - -if(APPLE) - find_library(COCOA_LIBRARY Cocoa) - list(APPEND LIBRARIES ${COCOA_LIBRARY}) -endif() - -target_include_directories(minori PUBLIC ${Qt5Widgets_INCLUDE_DIRS} ${Qt5Test_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} PRIVATE include) +target_include_directories(minori PUBLIC ${Qt5Widgets_INCLUDE_DIRS} ${CURL_INCLUDE_DIRS} PRIVATE include) target_compile_options(minori PRIVATE -Wall -Wextra -Wsuggest-override) if(APPLE) target_compile_definitions(minori PUBLIC MACOSX)