Convert gncmod-html module into ordinary shared library gnc-html

The module wasn't being used.
This commit is contained in:
Geert Janssens 2020-04-18 18:16:13 +02:00
parent 6cedd0d7a6
commit 954c1a001d
7 changed files with 12 additions and 93 deletions

View File

@ -883,7 +883,7 @@ if (WITH_SQL)
endif()
if (WITH_GNUCASH)
list(APPEND _MODULES gnc-gnome)
list(APPEND _MODULES gnc-gnome gnc-html)
endif()
set_target_properties(${_MODULES} PROPERTIES

View File

@ -139,12 +139,12 @@ add_library (gnc-gnome ${gnc_gnome_SOURCES} ${gnc_gnome_noinst_HEADERS} ${SWIG_G
target_link_libraries(gnc-gnome
gncmod-gnome-search
gncmod-ledger-core
gncmod-html
gncmod-report
gncmod-register-gnome
gncmod-register-core
gncmod-gnome-utils
gnc-engine
gnc-html
gnc-locale-tax
gnucash-guile
${Boost_LIBRARIES}

View File

@ -12,11 +12,10 @@ set (html_HEADERS
# Command to generate the swig-gnc-html.c wrapper file
gnc_add_swig_guile_command (swig-gnc-html-c
SWIG_GNC_HTML_C swig-gnc-html.c
${CMAKE_CURRENT_SOURCE_DIR}/gnc-html.i "" "${gncmod_html_HEADERS}"
${CMAKE_CURRENT_SOURCE_DIR}/gnc-html.i "" "${html_HEADERS}"
)
set (html_SOURCES
gncmod-html.c
gnc-html.c
gnc-html-history.c
gnc-html-factory.c
@ -37,7 +36,7 @@ endif()
set (gnc_html_SCHEME html.scm)
set(GUILE_OUTPUT_DIR gnucash)
set(GUILE_DEPENDS gncmod-html gnucash-guile)
set(GUILE_DEPENDS gnc-html gnucash-guile)
gnc_add_scheme_targets(scm-gnc-html
SOURCES "${gnc_html_SCHEME}"
@ -46,28 +45,28 @@ gnc_add_scheme_targets(scm-gnc-html
set_dist_list(html_DIST CMakeLists.txt ${html_HEADERS} ${html_SOURCES} gnc-html.i ${html_EXTRA_DIST} html.scm)
add_library (gncmod-html
add_library (gnc-html
${html_SOURCES}
${SWIG_GNC_HTML_C}
${html_HEADERS}
)
target_link_libraries(gncmod-html gnc-engine gnc-module gncmod-gnome-utils
target_link_libraries(gnc-html gnc-engine gnc-module gncmod-gnome-utils
PkgConfig::GTK3 PkgConfig::WEBKIT ${GUILE_LDFLAGS})
target_compile_definitions(gncmod-html PRIVATE -DG_LOG_DOMAIN=\"gnc.html\")
target_compile_definitions(gnc-html PRIVATE -DG_LOG_DOMAIN=\"gnc.html\")
target_include_directories (gncmod-html
target_include_directories (gnc-html
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
if (APPLE)
set_target_properties (gncmod-html PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/gnucash")
set_target_properties (gnc-html PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/gnucash")
endif()
install(TARGETS gncmod-html
install(TARGETS gnc-html
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/gnucash
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/gnucash
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

View File

@ -1,79 +0,0 @@
/*********************************************************************
* gncmod-html.c
* module definition/initialization for the html utilities
*
* Copyright (c) 2001 Linux Developers Group, Inc.
*********************************************************************/
/********************************************************************\
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* *
* This program 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 General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License*
* along with this program; if not, contact: *
* *
* Free Software Foundation Voice: +1-617-542-5942 *
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
* Boston, MA 02110-1301, USA gnu@gnu.org *
* *
\********************************************************************/
#include <config.h>
#include <gmodule.h>
#include <libguile.h>
#include <gtk/gtk.h>
#include "gnc-module.h"
#include "gnc-module-api.h"
#include "gnc-html.h"
#include "qof.h"
GNC_MODULE_API_DECL(libgncmod_html)
/* version of the gnc module system interface we require */
int libgncmod_html_gnc_module_system_interface = 0;
/* module versioning uses libtool semantics. */
int libgncmod_html_gnc_module_current = 0;
int libgncmod_html_gnc_module_revision = 0;
int libgncmod_html_gnc_module_age = 0;
char *
libgncmod_html_gnc_module_path( void )
{
return g_strdup( "gnucash/html" );
}
char *
libgncmod_html_gnc_module_description( void )
{
return g_strdup( "Utilities for using HTML with GnuCash" );
}
extern SCM scm_init_sw_gnc_html_module( void );
int
libgncmod_html_gnc_module_init( int refcount )
{
scm_init_sw_gnc_html_module();
gnc_html_initialize();
scm_c_use_module( "sw_gnc_html" );
return TRUE;
}
int
libgncmod_html_gnc_module_end( int refcount )
{
return TRUE;
}

View File

@ -29,7 +29,7 @@
;; Guile 2 needs to find the symbols from the extension at compile time already
(eval-when
(compile load eval expand)
(load-extension "libgncmod-html" "scm_init_sw_gnc_html_module"))
(load-extension "libgnc-html" "scm_init_sw_gnc_html_module"))
(use-modules (sw_gnc_html))
; Export the swig-wrapped symbols in the public interface of this module

View File

@ -11,7 +11,7 @@ set(GUILE_DEPENDS
scm-core-utils
scm-core-utils
scm-engine
gncmod-html
gnc-html
scm-report
)

View File

@ -273,7 +273,6 @@ gnucash/html/gnc-html-factory.c
gnucash/html/gnc-html-history.c
gnucash/html/gnc-html-webkit1.c
gnucash/html/gnc-html-webkit2.c
gnucash/html/gncmod-html.c
gnucash/html/html.scm
gnucash/import-export/aqb/assistant-ab-initial.c
gnucash/import-export/aqb/assistant-ab-initial.glade