comparison extern/libcompat/win/dlfcn/CMakeLists.txt @ 948:21a91311c8ea

cmake: switch back, GNU make is painful
author David Demelier <markand@malikania.fr>
date Sat, 16 Jan 2021 17:58:46 +0100
parents
children
comparison
equal deleted inserted replaced
947:95201fd9ad88 948:21a91311c8ea
1 project(dl)
2 add_library(
3 dl
4 STATIC
5 ${dl_SOURCE_DIR}/dlfcn.h
6 ${dl_SOURCE_DIR}/dlfcn.c
7 )
8
9 # Correctly export the location of installed includes in the target
10 target_include_directories(
11 dl
12 PUBLIC
13 $<BUILD_INTERFACE:${dl_SOURCE_DIR}>
14 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
15 )
16
17 if (CMAKE_C_COMPILER_ID MATCHES "MSVC")
18 target_compile_definitions(dl PRIVATE _CRT_SECURE_NO_WARNINGS)
19 endif ()
20
21 install(
22 TARGETS dl
23 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
24 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
25 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
26 )