CMake: Improve fltk-config generation

- set executable permissions on MinGW and more platforms
- add missing link libraries
- improve code formatting (indent)
- mark some variables as advanced
- simplify search for glib-2.0
This commit is contained in:
Albrecht Schlosser
2022-03-13 21:52:18 +01:00
parent 14e1954859
commit 59e028a3a7
3 changed files with 90 additions and 61 deletions

View File

@@ -105,18 +105,15 @@ configure_file(
@ONLY
)
if (UNIX)
execute_process (COMMAND chmod 755 fltk-config
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin"
)
endif (UNIX)
# Install fltk-config
# Note: no need to set execute perms, install (PROGRAMS) does this
install (PROGRAMS
${CMAKE_CURRENT_BINARY_DIR}/bin/fltk-config
DESTINATION ${FLTK_BINDIR}
)
if (UNIX OR MSYS OR (MINGW AND CMAKE_CROSSCOMPILING))
if (UNIX OR MSYS OR MINGW)
macro(INSTALL_MAN FILE LEVEL)
install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/documentation/src/${FILE}.man
@@ -132,4 +129,4 @@ if (UNIX OR MSYS OR (MINGW AND CMAKE_CROSSCOMPILING))
INSTALL_MAN (checkers 6)
INSTALL_MAN (sudoku 6)
endif (UNIX OR MSYS OR (MINGW AND CMAKE_CROSSCOMPILING))
endif (UNIX OR MSYS OR MINGW)