aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-04-06 22:04:45 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-04-07 00:08:13 +0300
commit7510fce232ba6c54d2e6df022cf38f90b6aa4cc2 (patch)
treedfe42bf57a75ebd64770bf2553376d0a4b04b43f /CMakeLists.txt
parentupdate cmake-common (diff)
downloadwinapi-common-7510fce232ba6c54d2e6df022cf38f90b6aa4cc2.tar.gz
winapi-common-7510fce232ba6c54d2e6df022cf38f90b6aa4cc2.zip
cmake: slight CMakeLists.txt refactoring
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt18
1 files changed, 7 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3fc3b4f..f3b6749 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,27 +1,23 @@
cmake_minimum_required(VERSION 3.5) # for Boost::* imported targets
project(winapi_common CXX)
-
enable_testing()
include(cmake/common.cmake)
+find_package(Boost REQUIRED)
+if(NOT TARGET SafeInt)
+ add_subdirectory(3rdparty/microsoft/SafeInt EXCLUDE_FROM_ALL)
+endif()
+add_subdirectory(3rdparty/winapi/utf8 EXCLUDE_FROM_ALL)
+
file(GLOB_RECURSE winapi_common_include "include/*.hpp")
file(GLOB winapi_common_src "src/*.cpp")
add_library(winapi_common ${winapi_common_include} ${winapi_common_src})
target_include_directories(winapi_common PUBLIC include)
-
-add_subdirectory(3rdparty/winapi/utf8 EXCLUDE_FROM_ALL)
target_link_libraries(winapi_common PRIVATE winapi_utf8)
-
-if(NOT TARGET SafeInt)
- add_subdirectory(3rdparty/microsoft/SafeInt EXCLUDE_FROM_ALL)
-endif()
target_link_libraries(winapi_common PUBLIC SafeInt)
-
-find_package(Boost REQUIRED)
-target_link_libraries(winapi_common PUBLIC Boost::boost)
-
+target_link_libraries(winapi_common PUBLIC Boost::disable_autolinking Boost::boost)
install(TARGETS winapi_common ARCHIVE DESTINATION lib)
install(DIRECTORY include/winapi DESTINATION include)