Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
converted project to use cmake
  • Loading branch information
nickcano committed Mar 5, 2018
1 parent 5c91b2f commit 2429422
Show file tree
Hide file tree
Showing 55 changed files with 13,560 additions and 936 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Expand Up @@ -42,3 +42,8 @@
ipch/*
Debug/*
Release/*
build/
deps/detours/lib.X86/*
deps/detours/bin.X86/*
deps/detours/src/obj.X86/*
deps/detours/include/*
31 changes: 31 additions & 0 deletions CMakeLists.txt
@@ -0,0 +1,31 @@
cmake_minimum_required (VERSION 3.6)
project (ThePackerAttacker)

# setup some required paths
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin")
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin")
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin")

foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
string( TOUPPER ${OUTPUTCONFIG} UOUTPUTCONFIG )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${UOUTPUTCONFIG} "${CMAKE_CURRENT_SOURCE_DIR}/bin/${OUTPUTCONFIG}" )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY_${UOUTPUTCONFIG} "${CMAKE_CURRENT_SOURCE_DIR}/bin/${OUTPUTCONFIG}" )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${UOUTPUTCONFIG} "${CMAKE_CURRENT_SOURCE_DIR}/bin/${OUTPUTCONFIG}" )
endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )


# set up deps and linkers and include stuff
include_directories ("src")

set (DEPS_DETOURS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/deps/detours")
include_directories ("${DEPS_DETOURS_DIR}/include")
link_libraries ("${DEPS_DETOURS_DIR}/lib.X86/detours.lib")

if (WIN32)
link_libraries ("Psapi.lib")
endif()


# include our sub projects
add_subdirectory ("src")
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT PackerAttackerInject)
82 changes: 0 additions & 82 deletions PackerAttacker/PackerAttacker.vcxproj

This file was deleted.

22 changes: 0 additions & 22 deletions PackerAttacker/PackerAttacker.vcxproj.filters

This file was deleted.

104 changes: 0 additions & 104 deletions PackerAttackerHook/PackerAttackerHook.vcxproj

This file was deleted.

69 changes: 0 additions & 69 deletions PackerAttackerHook/PackerAttackerHook.vcxproj.filters

This file was deleted.

4 changes: 0 additions & 4 deletions PackerAttackerHook/detours.h

This file was deleted.

26 changes: 0 additions & 26 deletions ThePackerAttacker.sln

This file was deleted.

6 changes: 6 additions & 0 deletions buildclean.bat
@@ -0,0 +1,6 @@
@rmdir /s /q .\build >nul 2>&1
@rmdir /s /q .\bin >nul 2>&1
@rmdir /s /q .\deps\detours\lib.X86 >nul 2>&1
@rmdir /s /q .\deps\detours\bin.X86 >nul 2>&1
@rmdir /s /q .\deps\detours\src\obj.X86 >nul 2>&1
@echo Cleared all build files
16 changes: 16 additions & 0 deletions buildmsvc.bat
@@ -0,0 +1,16 @@
@if not defined INCLUDE (
echo Must be run from a "Developer Command Prompt for VS"
) else (

if not exist "build" mkdir build

if exist deps\\detours\\lib.X86\\detours.lib (
echo NOT BUILDING Detours BECAUSE detours.lib ALREADY EXISTS.
echo To force rebuild of Detours, RUN buildclean.bat
cd build && cmake -G %1 Win32 ..\\ && cd ..
) else (
echo BUILDING Detours BECAUSE detours.lib DOESN'T EXIST.
cd deps\\detours && nmake && cd ..\\..\\build && cmake -G %1 Win32 ..\\ && cd ..
)

)
1 change: 1 addition & 0 deletions buildmsvc2017.bat
@@ -0,0 +1 @@
buildmsvc.bat "Visual Studio 15 2017"

0 comments on commit 2429422

Please sign in to comment.