-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
42 lines (36 loc) · 1.17 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
cmake_minimum_required(VERSION 3.8)
project(Xlibe)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-register")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
include_directories(include)
add_subdirectory(xlib)
add_subdirectory(xext)
add_subdirectory(test)
#####
## installation rules
#####
include(GNUInstallDirs)
install(DIRECTORY include/X11 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(TARGETS X11 Xext DESTINATION ${CMAKE_INSTALL_LIBDIR})
set(contents "
Name: X11
Description: X Library (Haiku compatibility)
Version: 1.6.12
Requires: xproto
Cflags:
Libs: -lX11 -Wl,--no-undefined
")
file(WRITE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/x11.pc ${contents})
install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/x11.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
set(contents "
Name: Xext
Description: Misc X Extension Library (Haiku compatility)
Version: 1.3.3
Requires: xextproto
Requires.private: x11
Cflags:
Libs: -lXext
")
file(WRITE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/xext.pc ${contents})
install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/xext.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)