diff --git a/.gitignore b/.gitignore index 1b7cf87..37e5c93 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -build/ +Build/ Builds/ *.vs/ +*.vscode/ *.pro.user diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bb83bf..b22980e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.5) -set(MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/.cmake/Modules") +set(MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${MODULE_DIR}) project(Textractor) @@ -17,9 +17,14 @@ add_definitions( include_directories(include) -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Build) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Build) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Build) +if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8") + set(CMAKE_FINAL_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/Builds/${CMAKE_BUILD_TYPE}/x64) +else() + set(CMAKE_FINAL_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/Builds/${CMAKE_BUILD_TYPE}/x86) +endif() +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_FINAL_OUTPUT_DIRECTORY}) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_FINAL_OUTPUT_DIRECTORY}) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_FINAL_OUTPUT_DIRECTORY}) set(CMAKE_CONFIGURATION_TYPES Debug Release) diff --git a/CMakeSettings.json b/CMakeSettings.json index db378f7..16350fc 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -5,45 +5,25 @@ "name": "x86-Debug", "generator": "Ninja", "configurationType": "Debug", - "inheritEnvironments": [ "msvc_x86" ], - "buildRoot": "${workspaceRoot}\\Builds\\${name}", - "installRoot": "${workspaceRoot}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", - "cmakeCommandArgs": "", - "buildCommandArgs": "-v", - "ctestCommandArgs": "" + "inheritEnvironments": [ "msvc_x86" ] }, { "name": "x86-Release", "generator": "Ninja", "configurationType": "RelWithDebInfo", - "inheritEnvironments": [ "msvc_x86" ], - "buildRoot": "${workspaceRoot}\\Builds\\${name}", - "installRoot": "${workspaceRoot}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", - "cmakeCommandArgs": "", - "buildCommandArgs": "-v", - "ctestCommandArgs": "" + "inheritEnvironments": [ "msvc_x86" ] }, { "name": "x64-Debug", "generator": "Ninja", "configurationType": "Debug", - "inheritEnvironments": [ "msvc_x64" ], - "buildRoot": "${workspaceRoot}\\Builds\\${name}", - "installRoot": "${workspaceRoot}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", - "cmakeCommandArgs": "", - "buildCommandArgs": "-v", - "ctestCommandArgs": "" + "inheritEnvironments": [ "msvc_x64" ] }, { "name": "x64-Release", "generator": "Ninja", "configurationType": "RelWithDebInfo", - "inheritEnvironments": [ "msvc_x64" ], - "buildRoot": "${workspaceRoot}\\Builds\\${name}", - "installRoot": "${workspaceRoot}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", - "cmakeCommandArgs": "", - "buildCommandArgs": "-v", - "ctestCommandArgs": "" + "inheritEnvironments": [ "msvc_x64" ] } ] } \ No newline at end of file diff --git a/.cmake/Modules/QtUtils.cmake b/cmake/QtUtils.cmake similarity index 100% rename from .cmake/Modules/QtUtils.cmake rename to cmake/QtUtils.cmake diff --git a/deploy.ps1 b/deploy.ps1 index 27a5fef..952f2f0 100644 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -1,4 +1,4 @@ -cd Builds/x86-Release/Build; +cd Builds/RelWithDebInfo/x86; Compress-Archive -Force -Path "Textractor.exe","styles","platforms","Qt5Core.dll","Qt5Gui.dll","Qt5Widgets.dll","vnrhook.dll","256_Remove Repetition.dll","512_Copy to Clipboard.dll","1024_Bing Translate.dll","2048_Extra Newlines.dll" -DestinationPath Textractor; -cd ../../x64-Release/Build; +cd ../x64; Compress-Archive -Force -Path "Textractor.exe","styles","platforms","Qt5Core.dll","Qt5Gui.dll","Qt5Widgets.dll","vnrhook.dll","256_Remove Repetition.dll","512_Copy to Clipboard.dll","1024_Bing Translate.dll","2048_Extra Newlines.dll" -DestinationPath Textractor;