mirror of
https://github.com/fltk/fltk.git
synced 2026-05-27 19:10:24 +08:00
Generate FL/fl_config.h rather than FL/abi-version.h
... as discussed in fltk.coredev in thread "RFC: introduce public config header <FL/fl_config.h>", see: https://groups.google.com/g/fltkcoredev/c/xLCs1AIXMVo/m/MHZpQggzAQAJ - Rename abi-version.h to fl_config.h, rename input files, update dependencies, .gitignore, CMake, configure and Makefiles. - Include Cairo options in FL/fl_config.h - Rename FLTK_USE_CAIRO to FLTK_HAVE_CAIROEXT for consistency. - Include <FL/fl_config.h> in config.h and wherever necessary, fix include order (move FL/Fl.H to the top) and more. - Move USE_X11 to fl_config.h and rename to FLTK_USE_X11 - Do not include <config.h> in Cairo demo program which is no longer required in Cairo programs since FLTK 1.4.0
This commit is contained in:
+2
-2
@@ -31,8 +31,8 @@ configure_file(
|
||||
|
||||
# create a custom abi file for this setup
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/abi-version.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/AndroidStudio/FL/abi-version.h"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/fl_config.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/AndroidStudio/FL/fl_config.h"
|
||||
@ONLY
|
||||
)
|
||||
|
||||
|
||||
@@ -116,6 +116,11 @@ macro (CREATE_EXAMPLE NAME SOURCES LIBRARIES)
|
||||
set_target_properties (${TARGET_NAME} PROPERTIES OUTPUT_NAME ${NAME})
|
||||
target_link_libraries (${TARGET_NAME} ${LIBRARIES})
|
||||
|
||||
# we must link all programs with fltk_cairo if option CAIROEXT is enabled
|
||||
if (FLTK_HAVE_CAIROEXT)
|
||||
target_link_libraries (${TARGET_NAME} fltk_cairo cairo)
|
||||
endif ()
|
||||
|
||||
if (FLTK_HAVE_CAIRO)
|
||||
fl_target_link_directories (${TARGET_NAME} PRIVATE "${PKG_CAIRO_LIBRARY_DIRS}")
|
||||
endif ()
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ install (DIRECTORY
|
||||
DESTINATION ${FLTK_INCLUDEDIR} USE_SOURCE_PERMISSIONS
|
||||
FILES_MATCHING
|
||||
PATTERN "*.[hH]"
|
||||
PATTERN "abi-version.h" EXCLUDE
|
||||
PATTERN "fl_config.h" EXCLUDE
|
||||
)
|
||||
|
||||
install (DIRECTORY
|
||||
|
||||
+3
-3
@@ -76,7 +76,7 @@ set (PATH_TO_XLIBS)
|
||||
if ((NOT APPLE OR OPTION_APPLE_X11) AND NOT WIN32)
|
||||
include (FindX11)
|
||||
if (X11_FOUND)
|
||||
set (USE_X11 1)
|
||||
set (FLTK_USE_X11 1)
|
||||
list (APPEND FLTK_LDLIBS -lX11)
|
||||
if (X11_Xext_FOUND)
|
||||
list (APPEND FLTK_LDLIBS -lXext)
|
||||
@@ -164,7 +164,7 @@ option (OPTION_CAIROEXT
|
||||
)
|
||||
|
||||
set (FLTK_HAVE_CAIRO 0)
|
||||
set (FLTK_USE_CAIRO 0)
|
||||
set (FLTK_HAVE_CAIROEXT 0)
|
||||
|
||||
if (OPTION_CAIRO OR OPTION_CAIROEXT)
|
||||
pkg_search_module (PKG_CAIRO cairo)
|
||||
@@ -174,7 +174,7 @@ if (OPTION_CAIRO OR OPTION_CAIROEXT)
|
||||
if (PKG_CAIRO_FOUND)
|
||||
set (FLTK_HAVE_CAIRO 1)
|
||||
if (OPTION_CAIROEXT)
|
||||
set (FLTK_USE_CAIRO 1)
|
||||
set (FLTK_HAVE_CAIROEXT 1)
|
||||
endif (OPTION_CAIROEXT)
|
||||
add_subdirectory (cairo)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user