diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-12 23:22:04 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-12 23:22:04 +0200 |
| commit | afc3f8dbf7d86ead03f73918378866d9548c413a (patch) | |
| tree | 113e9d470adf787e233801907a09dceeb8a8a6ab | |
| parent | upgrade winapi-utf8 (diff) | |
| download | winapi-common-afc3f8dbf7d86ead03f73918378866d9548c413a.tar.gz winapi-common-afc3f8dbf7d86ead03f73918378866d9548c413a.zip | |
cmake: move main library code to src/
Diffstat (limited to '')
| -rw-r--r-- | CMakeLists.txt | 18 | ||||
| -rw-r--r-- | src/CMakeLists.txt | 17 |
2 files changed, 18 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2de5e91..8524142 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,25 +17,9 @@ endif() add_compile_definitions(WIN32_LEAN_AND_MEAN NOMINMAX) -find_package(Boost CONFIG REQUIRED) add_subdirectory(3rdparty/winapi/utf8 EXCLUDE_FROM_ALL) -file(GLOB_RECURSE winapi_common_include CONFIGURE_DEPENDS "include/*.hpp") -file(GLOB winapi_common_src CONFIGURE_DEPENDS "src/*.cpp") -add_library(winapi_common ${winapi_common_include} ${winapi_common_src}) -target_include_directories(winapi_common PUBLIC include) -target_link_libraries(winapi_common PRIVATE winapi_utf8) -target_link_libraries(winapi_common PUBLIC Boost::disable_autolinking Boost::boost) -install(TARGETS winapi_common ARCHIVE DESTINATION lib) -install(DIRECTORY include/winapi DESTINATION include) - -if(MINGW) - # FILE_ID_INFO and friends require at least 0x0602: - target_compile_definitions(winapi_common PUBLIC - NTDDI_VERSION=NTDDI_WIN8 - _WIN32_WINNT=_WIN32_WINNT_WIN8) -endif() - +add_subdirectory(src) if(WINAPI_COMMON_TESTS) add_subdirectory(test) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..b981652 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,17 @@ +find_package(Boost CONFIG REQUIRED) + +file(GLOB_RECURSE winapi_common_include CONFIGURE_DEPENDS "../include/*.hpp") +file(GLOB winapi_common_src CONFIGURE_DEPENDS "*.cpp") +add_library(winapi_common ${winapi_common_include} ${winapi_common_src}) +target_include_directories(winapi_common PUBLIC ../include) +target_link_libraries(winapi_common PRIVATE winapi_utf8) +target_link_libraries(winapi_common PUBLIC Boost::disable_autolinking Boost::boost) +install(TARGETS winapi_common ARCHIVE DESTINATION lib) +install(DIRECTORY ../include/winapi DESTINATION include) + +if(MINGW) + # FILE_ID_INFO and friends require at least 0x0602: + target_compile_definitions(winapi_common PUBLIC + NTDDI_VERSION=NTDDI_WIN8 + _WIN32_WINNT=_WIN32_WINNT_WIN8) +endif() |
