stdutil: CMake-ify

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2019-01-18 15:54:06 +01:00
parent 826428bc1a
commit e8c8fbd2bf
3 changed files with 76 additions and 7 deletions
+72
View File
@@ -0,0 +1,72 @@
project(stdutil)
SET(PUBLIC
"stdutil.hpp"
)
SET(PRIVATE
"stdutil.cpp"
)
add_library(${PROJECT_NAME} STATIC
${PUBLIC}
${PRIVATE}
)
target_link_libraries(${PROJECT_NAME}
PUBLIC
config
)
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()
+3 -6
View File
@@ -1,5 +1,5 @@
#include "stdutil.h" #include "stdutil.hpp"
#include <set> #include <set>
#include <math.h> #include <math.h>
@@ -127,11 +127,8 @@ void _cdecl operator delete[](void *q, const char *file, int line) { op_delete(q
#else #else
void trackmem(bool enable) { #define trackmem
} #define checkmem
void checkmem(ostream &out) {
}
#endif #endif
+1 -1
View File
@@ -4,7 +4,7 @@
#pragma warning(disable:4786) #pragma warning(disable:4786)
#include "../config/config.h" #include "config.hpp"
#include <string> #include <string>
#include <iostream> #include <iostream>