mirror of
https://git.eden-emu.dev/eden-emu/libadrenotools
synced 2026-02-04 02:41:22 +01:00
Add shared library install target supporting pkgconfig
This commit is contained in:
@@ -6,6 +6,8 @@ endif()
|
||||
|
||||
project(adrenotools LANGUAGES CXX C)
|
||||
|
||||
set(GEN_INSTALL_TARGET OFF CACHE BOOL "")
|
||||
|
||||
add_subdirectory(lib/linkernsbypass)
|
||||
|
||||
set(LIB_SOURCES src/bcenabler.cpp
|
||||
@@ -22,3 +24,14 @@ target_compile_options(adrenotools PRIVATE -Wall -Wextra)
|
||||
target_link_libraries(adrenotools android linkernsbypass)
|
||||
|
||||
add_subdirectory(src/hook)
|
||||
if (${BUILD_SHARED_LIBS})
|
||||
target_link_options(adrenotools PRIVATE "-Wl,-s,--exclude-libs,liblinkernsbypass.a")
|
||||
endif()
|
||||
if (${GEN_INSTALL_TARGET})
|
||||
configure_file(adrenotools.pc.in adrenotools.pc @ONLY)
|
||||
install(FILES ${CMAKE_BINARY_DIR}/adrenotools.pc DESTINATION lib/pkgconfig)
|
||||
install(TARGETS adrenotools main_hook file_redirect_hook gsl_alloc_hook hook_impl)
|
||||
install(DIRECTORY include/
|
||||
DESTINATION include
|
||||
FILES_MATCHING PATTERN "*.h*")
|
||||
endif()
|
||||
|
||||
13
adrenotools.pc.in
Normal file
13
adrenotools.pc.in
Normal file
@@ -0,0 +1,13 @@
|
||||
prefix="@CMAKE_INSTALL_PREFIX@"
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: adrenotools
|
||||
Description:
|
||||
URL:
|
||||
Version: 1.0.0
|
||||
Libs: -L${libdir} -ladrenotools
|
||||
Libs.private:
|
||||
Requires.private:
|
||||
Cflags: -I${includedir}
|
||||
@@ -7,6 +7,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "priv.h"
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user