summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-06-12 23:34:29 +0200
committerEgor Tensin <egor@tensin.name>2026-06-12 23:34:29 +0200
commitf3e9f49f0db9ac3f04377aa68665c005234895f4 (patch)
tree3ff3eda3dd4ba30bec1665c92c33d5fb623da2d5 /src
parentadd scripts to setup git hooks (diff)
downloadwinapi-debug-f3e9f49f0db9ac3f04377aa68665c005234895f4.tar.gz
winapi-debug-f3e9f49f0db9ac3f04377aa68665c005234895f4.zip
cmake: move main library code to src/
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..e33a267
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,21 @@
+find_package(Boost CONFIG REQUIRED)
+
+file(GLOB_RECURSE winapi_debug_include CONFIGURE_DEPENDS "../include/*.hpp")
+file(GLOB_RECURSE winapi_debug_src CONFIGURE_DEPENDS "*.cpp")
+add_library(winapi_debug ${winapi_debug_include} ${winapi_debug_src})
+target_compile_definitions(winapi_debug PUBLIC _NO_CVCONST_H)
+target_include_directories(winapi_debug PUBLIC ../include/)
+target_link_libraries(winapi_debug
+ PUBLIC winapi_common
+ PRIVATE winapi_utf8)
+target_link_libraries(winapi_debug
+ PUBLIC Boost::boost
+ PRIVATE Boost::disable_autolinking)
+target_link_libraries(winapi_debug PRIVATE dbghelp)
+INSTALL(TARGETS winapi_debug ARCHIVE DESTINATION lib)
+install(DIRECTORY ../include/winapi DESTINATION include)
+
+if(MSVC_VERSION EQUAL 1900)
+ # DbgHelp warnings on Visual Studio 2015:
+ target_compile_options(winapi_debug PUBLIC /wd4091)
+endif()