win support
This commit is contained in:
parent
e6c33df2a4
commit
5981d6d6d9
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "third-party/fmt"]
|
||||||
|
path = third-party/fmt
|
||||||
|
url = https://github.com/fmtlib/fmt.git
|
@ -2,13 +2,15 @@ cmake_minimum_required(VERSION 3.0)
|
|||||||
project(task1)
|
project(task1)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_AUTOMOC ON)
|
#set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
#set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_AUTOUIC ON)
|
#set(CMAKE_AUTOUIC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
|
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/installed)
|
||||||
|
|
||||||
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
|
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
|
||||||
set(CMAKE_)
|
#set(CMAKE_)
|
||||||
add_compile_options(
|
add_compile_options(
|
||||||
-Wall
|
-Wall
|
||||||
-Wpedantic
|
-Wpedantic
|
||||||
@ -19,5 +21,5 @@ if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
|
|||||||
NDEBUG)
|
NDEBUG)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
add_subdirectory(third-party/fmt)
|
||||||
add_subdirectory(task1)
|
add_subdirectory(task1)
|
@ -1,7 +1,5 @@
|
|||||||
find_package(Qt6 COMPONENTS Core REQUIRED)
|
|
||||||
find_package(fmt)
|
|
||||||
|
|
||||||
find_package(Python3 COMPONENTS Interpreter REQUIRED)
|
find_package(Python3 COMPONENTS Interpreter REQUIRED)
|
||||||
|
find_package(fmt)
|
||||||
|
|
||||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dataset.dat
|
add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/dataset.dat
|
||||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dataset-gen.py
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dataset-gen.py
|
||||||
@ -22,8 +20,11 @@ add_executable(task1_7 main.cpp
|
|||||||
mergesort.h
|
mergesort.h
|
||||||
mergesort_mt.h)
|
mergesort_mt.h)
|
||||||
|
|
||||||
target_link_libraries(task1_7
|
target_link_libraries(task1_7 PRIVATE
|
||||||
fmt::fmt
|
fmt::fmt)
|
||||||
Qt::Core)
|
|
||||||
|
|
||||||
|
install(TARGETS task1_7 DESTINATION bin)
|
||||||
|
install(IMPORTED_RUNTIME_ARTIFACTS task1_7 DESTINATION bin)
|
||||||
|
|
||||||
add_dependencies(task1_7 task1_7_dataset)
|
add_dependencies(task1_7 task1_7_dataset)
|
||||||
|
1
third-party/fmt
vendored
Submodule
1
third-party/fmt
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 050d41e85760ea7d21de1d4d9fae16219365aa8e
|
11
toolchains/win.cmake
Normal file
11
toolchains/win.cmake
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
set(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
|
||||||
|
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
|
||||||
|
|
||||||
|
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwindows -march=x86_64-w64")
|
||||||
|
|
||||||
|
set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
Loading…
Reference in New Issue
Block a user