Mercurial > minori
changeset 12:cf6a73a5ba1c
cmake: fix for mingw
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Mon, 18 Sep 2023 23:40:11 -0400 |
parents | fc1bf97c528b |
children | 4caed653e685 |
files | CMakeLists.txt |
diffstat | 1 files changed, 20 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- 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)