Skip to content

Commit

Permalink
开源整理
Browse files Browse the repository at this point in the history
  • Loading branch information
slicol committed Aug 25, 2023
1 parent 5319b41 commit be12f6c
Show file tree
Hide file tree
Showing 23 changed files with 451 additions and 540 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,16 @@
*.app
.vs
Debug

build
cmake-build*
.idea
/bin
Output/*
TestGroup
RunMetaHeaderToolTest.bat
.vs
CMakeSettings.json
Sample
Output*
Sample*
25 changes: 25 additions & 0 deletions Build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@echo off
setlocal enabledelayedexpansion
set batdir="%~dp0"
cd /d %batdir%
.\vswhere.exe -latest -property productPath > tmp.vswhere.txt
set /p VS_DIR=< tmp.vswhere.txt
set VS_DIR=%VS_DIR:devenv.exe=devenv.com%
.\vswhere.exe -latest -property catalog_productLineVersion > tmp.vswhere.txt
set /p VS_YEAR=< tmp.vswhere.txt
.\vswhere.exe -latest -property catalog_buildVersion > tmp.vswhere.txt
set /p VS_VERSION=< tmp.vswhere.txt
set VS_VERSION=%VS_VERSION:~0,2%
.\vswhere.exe -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe > tmp.vswhere.txt
set /p MSBUILD_DIR=< tmp.vswhere.txt
del tmp.vswhere.txt
echo "Visual Studio Dir = %VS_DIR%"
echo "Visual Studio Product Line = %VS_YEAR%"
echo "Visual Studio Version = %VS_VERSION%"

mkdir build
cd build
cmake -G "Visual Studio %VS_VERSION% %VS_YEAR%" -A x64 -S .. -B .
rem "%VS_DIR%" SGMemory.sln /Build "Release|x64" /MP
"%MSBUILD_DIR%" INSTALL.vcxproj -m:8 -property:Configuration=Release -property:Platform=x64
pause
46 changes: 46 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
cmake_minimum_required(VERSION 3.2)
set(CMAKE_BUILD_TYPE "Release")

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version")
#set(CMAKE_OSX_SYSROOT /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk)
# Make PROJECT_SOURCE_DIR, PROJECT_BINARY_DIR, and PROJECT_NAME available.

set(PROJECT_NAME SGMemory LANGUAGES CXX)
set (CMAKE_CXX_STANDARD 17)
project(${PROJECT_NAME})
message("=================================================")
message("================ SGMemory-Project ===============")
message("=================================================")
message(${PROJECT_SOURCE_DIR})
set(SGMemoryProjectDir ${PROJECT_SOURCE_DIR})


set(DIR_DEBUG_OUT ${PROJECT_BINARY_DIR}/lib/Debug)
set(DIR_RELEASE_OUT ${PROJECT_BINARY_DIR}/lib/Release)

if(MSVC)
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MT")
else()

endif ()
add_definitions(-D MT_WIN_EV)
else()
add_definitions(-fdeclspec)
endif()

add_definitions(-DUNICODE -D_UNICODE)
add_definitions(-D WITH_EDITOR)


################################
# Normal Libraries & Executables
################################
add_subdirectory(SGMemory)
add_subdirectory(SGMemoryTest)


################################
# Install files
################################
21 changes: 0 additions & 21 deletions MemSnap.cpp

This file was deleted.

31 changes: 0 additions & 31 deletions SGMemory.sln

This file was deleted.

156 changes: 0 additions & 156 deletions SGMemory.vcxproj

This file was deleted.

45 changes: 0 additions & 45 deletions SGMemory.vcxproj.filters

This file was deleted.

4 changes: 0 additions & 4 deletions SGMemory.vcxproj.user

This file was deleted.

Loading

0 comments on commit be12f6c

Please sign in to comment.