Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cmake option WANT_PERL_DOCS to disable doc generation. #2635

Merged
merged 4 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,7 @@ if(CMAKE_USE_WIN32_THREADS_INIT OR CMAKE_USE_PTHREADS_INIT)
set(CMAKE_STATUS_THREADS_SUPPORT "Win32")
list(APPEND CMAKE_KVIRC_BUILD_FLAGS Threads=Win32)
else()
if(CMAKE_HAVE_THREADS_LIBRARY)
list(APPEND LIBS ${CMAKE_THREAD_LIBS_INIT})
endif()
list(APPEND LIBS Threads::Threads)
set(COMPILE_THREADS_USE_POSIX 1)
list(APPEND CMAKE_KVIRC_BUILD_FLAGS Threads=POSIX)
if(WANT_IGNORE_SIGALARM)
Expand Down Expand Up @@ -410,6 +408,8 @@ endif()
# first check if Qt6 or Qt5 has to be used
if(NOT DEFINED QT_VERSION_MAJOR)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
else()
find_package(QT NAMES Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core)
endif()
# second, detect available modules for the specific Qt version
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets)
Expand Down Expand Up @@ -770,27 +770,26 @@ else()
endif()

# Check for Perl support
# (note: needed for user documentation generation)
option(WANT_PERL "Compile Perl support" ON)
option(WANT_PERL_DOCS "Use Perl to build documentation" ON)
if(WANT_PERL OR WANT_PERL_DOCS)
find_package(Perl)
endif()

# Perl is needed for documentation, too
find_package(Perl)

if(WANT_PERL)
if(PERL_FOUND)
if(PERL_FOUND)
if(WANT_PERL)
set(COMPILE_PERL_SUPPORT 1)
set(CMAKE_STATUS_PERL_SUPPORT "Yes, used for scripting+doc")

# Perl compilation / linking flags are handled inside perlcore module
else()
set(CMAKE_STATUS_PERL_SUPPORT "No")
set(CMAKE_STATUS_PERL_SUPPORT "Yes, used for scripting")
endif()
else()
if(PERL_FOUND)
if(WANT_PERL_DOCS)
set(CMAKE_STATUS_PERL_SUPPORT "Used for doc, but scripting disabled by user")
else()
set(CMAKE_STATUS_PERL_SUPPORT "No")
endif()
if(WANT_PERL AND WANT_PERL_DOCS)
set(CMAKE_STATUS_PERL_SUPPORT "Yes, used for scripting+doc")
endif()
else()
set(CMAKE_STATUS_PERL_SUPPORT "No")
endif()

# Check for Python support
Expand Down
2 changes: 1 addition & 1 deletion doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if(WIN32)
endif()

# User documentation
if(PERL_FOUND)
if(WANT_PERL_DOCS AND PERL_FOUND)

# The userdocs target is in the normal build process and rebuilds the documentation
# only when the revision number changes. This is useful for Git users and package users.
Expand Down
8 changes: 4 additions & 4 deletions src/kvirc/kernel/KviApplication_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ static QLibrary * g_pSetupLibrary = nullptr;

bool KviApplication::checkGlobalKvircDirectory(const QString szDir)
{
//First check if the help subdir exists
QString szHelpDir = szDir;
szHelpDir += KVI_PATH_SEPARATOR "help";
if(!KviFileUtils::directoryExists(szHelpDir))
//First check if the config subdir exists
QString szConfigDir = szDir;
szConfigDir += KVI_PATH_SEPARATOR "config";
if(!KviFileUtils::directoryExists(szConfigDir))
return false;
//Then check if the pics subdir exists
QString szPicsDir = szDir;
Expand Down
Loading