WIP:Build libisofs as a shared library. #65
Closed
Ghost
wants to merge 1 commits from feat/shared_libisofs
into master
@ -1,23 +1,57 @@
|
|||||||
#################################################
|
###########################################
|
||||||
#
|
# #
|
||||||
# (C) 2010 Serghei Amelian
|
# (C) 2010 Serghei Amelian #
|
||||||
# serghei (DOT) amelian (AT) gmail.com
|
# serghei (DOT) amelian (AT) gmail.com #
|
||||||
#
|
# #
|
||||||
# Improvements and feedback are welcome
|
# Improvements and feedback are welcome #
|
||||||
#
|
# #
|
||||||
# This file is released under GPL >= 2
|
# This file is released under GPL >= 2 #
|
||||||
#
|
# #
|
||||||
#################################################
|
###########################################
|
||||||
|
|
||||||
|
set( LIB_NAME isofs-tde )
|
||||||
|
configure_file( isofs_tde_export.h.cmake isofs_tde_export.h @ONLY )
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
##### isofs-tde (shared)
|
||||||
|
|
||||||
|
tde_add_library( ${LIB_NAME} SHARED
|
||||||
|
|
||||||
|
SOURCES
|
||||||
|
isofs_tde.c
|
||||||
|
|
||||||
|
DESTINATION ${LIB_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
##### pkg-config
|
||||||
|
|
||||||
|
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} )
|
||||||
|
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR} )
|
||||||
|
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_LIB_DIR ${LIB_INSTALL_DIR} )
|
||||||
|
|
||||||
|
configure_file( ${LIB_NAME}.pc.cmake ${LIB_NAME}.pc @ONLY )
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME}.pc
|
||||||
|
DESTINATION ${PKGCONFIG_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
##### isofs-static ##############################
|
##### headers
|
||||||
|
|
||||||
set( target isofs )
|
install(
|
||||||
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/isofs_tde_export.h
|
||||||
|
el_torito_tde.h
|
||||||
|
isofs_tde.h
|
||||||
|
rock_tde.h
|
||||||
|
iso_fs_tde.h
|
||||||
|
bswap_tde.h
|
||||||
|
|
||||||
tde_add_library( ${target} STATIC_PIC
|
DESTINATION ${INCLUDE_INSTALL_DIR}
|
||||||
SOURCES isofs.c
|
|
||||||
)
|
)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
|
exec_prefix=@PC_EXEC_PREFIX@
|
||||||
|
libdir=@PC_LIB_DIR@
|
||||||
|
includedir=@PC_INCLUDE_DIR@
|
||||||
|
|
||||||
|
Name: @LIB_NAME@
|
||||||
|
Description: @LIB_NAME@ implements the ISO-9660 file system found on CD-ROM media.
|
||||||
|
URL: https://mirror.git.trinitydesktop.org/gitea/TDE/tdelibs.git
|
||||||
|
Requires:
|
||||||
|
Version:
|
||||||
|
Libs: -L${libdir} -l@LIB_NAME@
|
||||||
|
Cflags: -I${includedir}
|
@ -0,0 +1,37 @@
|
|||||||
|
/* This file is part of the TDE libraries
|
||||||
|
Copyright (c) 2020 TDE Team
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Library General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public License
|
||||||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||||||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
Boston, MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ISOFS_TDE_EXPORT_H
|
||||||
|
#define ISOFS_TDE_EXPORT_H
|
||||||
|
|
||||||
|
/* Defined if you have fvisibility and fvisibility-inlines-hidden support. */
|
||||||
|
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
|
||||||
|
|
||||||
|
#if defined(__KDE_HAVE_GCC_VISIBILITY)
|
||||||
|
#define LIBISOFS_NO_EXPORT __attribute__ ((visibility("hidden")))
|
||||||
|
#define LIBISOFS_EXPORT __attribute__ ((visibility("default")))
|
||||||
|
#elif defined(_WIN32)
|
||||||
|
#define LIBISOFS_NO_EXPORT
|
||||||
|
#define LIBISOFS_EXPORT __declspec(dllexport)
|
||||||
|
#else
|
||||||
|
#define LIBISOFS_NO_EXPORT
|
||||||
|
#define LIBISOFS_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* ISOFS_TDE_EXPORT_H */
|
Loading…
Reference in new issue