File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 2.8.12...3.20)
2
2
3
- project (enet)
3
+ # I.e. The ABI version
4
+ project (enet VERSION 7.0.5)
5
+ set (ENET_VERSION "1.3.17" )
4
6
5
7
# The "configure" step.
6
8
include (CheckFunctionExists)
@@ -89,6 +91,10 @@ add_library(enet
89
91
${INCLUDE_FILES}
90
92
${SOURCE_FILES}
91
93
)
94
+ set_target_properties (enet PROPERTIES
95
+ SOVERSION ${PROJECT_VERSION_MAJOR}
96
+ VERSION ${PROJECT_VERSION}
97
+ )
92
98
93
99
if (MINGW)
94
100
target_link_libraries (enet winmm ws2_32)
@@ -101,3 +107,13 @@ install(TARGETS enet
101
107
102
108
install (DIRECTORY include /
103
109
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )
110
+
111
+ # Add variables for substitution in libenet.pc.in
112
+ set (PACKAGE_VERSION ${ENET_VERSION} )
113
+ set (PACKAGE_NAME "lib${PROJECT_NAME} " )
114
+ set (prefix ${CMAKE_INSTALL_PREFIX} )
115
+ set (exec_prefix ${CMAKE_INSTALL_PREFIX} )
116
+ set (libdir ${CMAKE_INSTALL_FULL_LIBDIR} )
117
+ set (includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR} )
118
+ configure_file (libenet.pc.in libenet.pc @ONLY)
119
+ install (FILES ${CMAKE_CURRENT_BINARY_DIR} /libenet.pc DESTINATION ${CMAKE_INSTALL_LIBDIR} /pkgconfig)
You can’t perform that action at this time.
0 commit comments