From 60fb17155e76b62a6acb4b3e3c623d10eb394672 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Fri, 3 Aug 2018 10:00:42 -0400 Subject: [PATCH] change build system, prepare for x64 someday --- CMakeLists.txt | 11 ++++------- CMakeSettings.json | 26 ++++++++++++++++++++++++-- GUI/GUI.pro | 2 +- {texthook => host}/CMakeLists.txt | 0 {texthook => host}/host.cc | 0 {texthook => host}/host.h | 0 {texthook => host}/pipe.cc | 0 {texthook => host}/pipe.h | 0 {texthook => host}/textthread.cc | 0 {texthook => host}/textthread.h | 0 {texthook => host}/winmutex.h | 0 vnrhook/CMakeLists.txt | 2 +- 12 files changed, 30 insertions(+), 11 deletions(-) rename {texthook => host}/CMakeLists.txt (100%) rename {texthook => host}/host.cc (100%) rename {texthook => host}/host.h (100%) rename {texthook => host}/pipe.cc (100%) rename {texthook => host}/pipe.h (100%) rename {texthook => host}/textthread.cc (100%) rename {texthook => host}/textthread.h (100%) rename {texthook => host}/winmutex.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index f865983..838c872 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,15 +22,12 @@ add_definitions( /DITH_HAS_CRT ) -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/Debug) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/Debug) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/Debug) -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/Release) -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/Release) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/Release) +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) set(CMAKE_CONFIGURATION_TYPES Debug Release) -add_subdirectory(texthook) +add_subdirectory(host) add_subdirectory(vnrhook) add_subdirectory(GUI) diff --git a/CMakeSettings.json b/CMakeSettings.json index b7b4bdf..c91fb67 100644 --- a/CMakeSettings.json +++ b/CMakeSettings.json @@ -6,7 +6,7 @@ "generator": "Ninja", "configurationType": "Debug", "inheritEnvironments": [ "msvc_x86" ], - "buildRoot": "${workspaceRoot}\\Builds\\${configurationType}", + "buildRoot": "${workspaceRoot}\\Builds\\${name}", "installRoot": "${workspaceRoot}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", "cmakeCommandArgs": "", "buildCommandArgs": "-v", @@ -17,7 +17,29 @@ "generator": "Ninja", "configurationType": "Release", "inheritEnvironments": [ "msvc_x86" ], - "buildRoot": "${workspaceRoot}\\Builds\\${configurationType}", + "buildRoot": "${workspaceRoot}\\Builds\\${name}", + "installRoot": "${workspaceRoot}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "-v", + "ctestCommandArgs": "" + }, + { + "name": "x64-Debug", + "generator": "Ninja", + "configurationType": "Debug", + "inheritEnvironments": [ "msvc_x86_x64" ], + "buildRoot": "${workspaceRoot}\\Builds\\${name}", + "installRoot": "${workspaceRoot}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "-v", + "ctestCommandArgs": "" + }, + { + "name": "x64-Release", + "generator": "Ninja", + "configurationType": "Release", + "inheritEnvironments": [ "msvc_x86_x64" ], + "buildRoot": "${workspaceRoot}\\Builds\\${name}", "installRoot": "${workspaceRoot}\\CMakeBuilds\\${workspaceHash}\\install\\${name}", "cmakeCommandArgs": "", "buildCommandArgs": "-v", diff --git a/GUI/GUI.pro b/GUI/GUI.pro index b06d853..16cda77 100644 --- a/GUI/GUI.pro +++ b/GUI/GUI.pro @@ -39,7 +39,7 @@ FORMS += \ mainwindow.ui win32: LIBS += \ - -L$$PWD/../Builds/Debug/Debug/ -lvnrhost + -L$$PWD/../Builds/x86-Debug/Build/ -lvnrhost # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin diff --git a/texthook/CMakeLists.txt b/host/CMakeLists.txt similarity index 100% rename from texthook/CMakeLists.txt rename to host/CMakeLists.txt diff --git a/texthook/host.cc b/host/host.cc similarity index 100% rename from texthook/host.cc rename to host/host.cc diff --git a/texthook/host.h b/host/host.h similarity index 100% rename from texthook/host.h rename to host/host.h diff --git a/texthook/pipe.cc b/host/pipe.cc similarity index 100% rename from texthook/pipe.cc rename to host/pipe.cc diff --git a/texthook/pipe.h b/host/pipe.h similarity index 100% rename from texthook/pipe.h rename to host/pipe.h diff --git a/texthook/textthread.cc b/host/textthread.cc similarity index 100% rename from texthook/textthread.cc rename to host/textthread.cc diff --git a/texthook/textthread.h b/host/textthread.h similarity index 100% rename from texthook/textthread.h rename to host/textthread.h diff --git a/texthook/winmutex.h b/host/winmutex.h similarity index 100% rename from texthook/winmutex.h rename to host/winmutex.h diff --git a/vnrhook/CMakeLists.txt b/vnrhook/CMakeLists.txt index 58c2728..ded4e2d 100644 --- a/vnrhook/CMakeLists.txt +++ b/vnrhook/CMakeLists.txt @@ -1,4 +1,4 @@ -project(engine) +project(vnrhook) include_directories(${CMAKE_CURRENT_SOURCE_DIR})