linker: CMake-ify
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
project(linker)
|
||||
|
||||
add_subdirectory(lib)
|
||||
|
||||
add_library(${PROJECT_NAME} SHARED
|
||||
"linker_dll.cpp"
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
linker_lib
|
||||
)
|
||||
|
||||
|
||||
if (WIN32)
|
||||
target_compile_definitions(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
_CRT_SECURE_NO_WARNINGS
|
||||
# windows.h
|
||||
WIN32_LEAN_AND_MEAN
|
||||
NOGPICAPMASKS
|
||||
NOVIRTUALKEYCODES
|
||||
#NOWINMESSAGES
|
||||
NOWINSTYLES
|
||||
NOSYSMETRICS
|
||||
NOMENUS
|
||||
NOICONS
|
||||
NOKEYSTATES
|
||||
NOSYSCOMMANDS
|
||||
NORASTEROPS
|
||||
NOSHOWWINDOW
|
||||
NOATOM
|
||||
NOCLIPBOARD
|
||||
NOCOLOR
|
||||
NOCTLMGR
|
||||
NODRAWTEXT
|
||||
#NOGDI
|
||||
NOKERNEL
|
||||
#NOUSER
|
||||
#NONLS
|
||||
NOMB
|
||||
NOMEMMGR
|
||||
NOMETAFILE
|
||||
NOMINMAX
|
||||
#NOMSG
|
||||
NOOPENFILE
|
||||
NOSCROLL
|
||||
NOSERVICE
|
||||
NOSOUND
|
||||
#NOTEXTMETRIC
|
||||
NOWH
|
||||
NOWINOFFSETS
|
||||
NOCOMM
|
||||
NOKANJI
|
||||
NOHELP
|
||||
NOPROFILER
|
||||
NODEFERWINDOWPOS
|
||||
NOMCX
|
||||
NOIME
|
||||
NOMDI
|
||||
NOINOUT
|
||||
)
|
||||
endif()
|
||||
@@ -0,0 +1,70 @@
|
||||
project(linker_lib)
|
||||
|
||||
add_library(${PROJECT_NAME} SHARED
|
||||
"dlltoexe.cpp"
|
||||
"dlltoexe.hpp"
|
||||
"image_util.cpp"
|
||||
"image_util.hpp"
|
||||
"linker.cpp"
|
||||
"linker.hpp"
|
||||
"std.cpp"
|
||||
"std.hpp"
|
||||
)
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
stdutil
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PUBLIC ${PROJECT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
target_compile_definitions(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
_CRT_SECURE_NO_WARNINGS
|
||||
# windows.h
|
||||
WIN32_LEAN_AND_MEAN
|
||||
NOGPICAPMASKS
|
||||
NOVIRTUALKEYCODES
|
||||
NOWINMESSAGES
|
||||
NOWINSTYLES
|
||||
NOSYSMETRICS
|
||||
NOMENUS
|
||||
NOICONS
|
||||
NOKEYSTATES
|
||||
NOSYSCOMMANDS
|
||||
NORASTEROPS
|
||||
NOSHOWWINDOW
|
||||
NOATOM
|
||||
NOCLIPBOARD
|
||||
NOCOLOR
|
||||
NOCTLMGR
|
||||
NODRAWTEXT
|
||||
NOGDI
|
||||
NOKERNEL
|
||||
#NOUSER
|
||||
NONLS
|
||||
#NOMB
|
||||
NOMEMMGR
|
||||
NOMETAFILE
|
||||
NOMINMAX
|
||||
NOMSG
|
||||
NOOPENFILE
|
||||
NOSCROLL
|
||||
NOSERVICE
|
||||
NOSOUND
|
||||
NOTEXTMETRIC
|
||||
NOWH
|
||||
NOWINOFFSETS
|
||||
NOCOMM
|
||||
NOKANJI
|
||||
NOHELP
|
||||
NOPROFILER
|
||||
NODEFERWINDOWPOS
|
||||
NOMCX
|
||||
NOIME
|
||||
NOMDI
|
||||
NOINOUT
|
||||
)
|
||||
endif()
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "dlltoexe.h"
|
||||
#include "std.hpp"
|
||||
#include "dlltoexe.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
#pragma pack( push,1 )
|
||||
struct Head{
|
||||
@@ -1,6 +1,8 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "image_util.h"
|
||||
#include "std.hpp"
|
||||
#include "image_util.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
#ifndef DEMO
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
|
||||
#include "std.h"
|
||||
#include "linker.h"
|
||||
#include "image_util.h"
|
||||
#include "std.hpp"
|
||||
#include "linker.hpp"
|
||||
#include "image_util.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class BBModule : public Module{
|
||||
public:
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
#include "std.hpp"
|
||||
@@ -1,10 +1,5 @@
|
||||
|
||||
#ifndef STD_LINKER_H
|
||||
#define STD_LINKER_H
|
||||
|
||||
#include "../config/config.h"
|
||||
#include "../stdutil/stdutil.h"
|
||||
|
||||
#pragma once
|
||||
#include <map>
|
||||
#include <list>
|
||||
#include <string>
|
||||
@@ -12,9 +7,6 @@
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include "stdutil.hpp"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
#endif
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
#include "../LinkerLib/std.h"
|
||||
#include "../LinkerLib/linker.h"
|
||||
#include "std.hpp"
|
||||
#include "linker.hpp"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
|
||||
#include "std.h"
|
||||
Reference in New Issue
Block a user