Skip to content

Commit

Permalink
build: restructure main CMakeLists.txt a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
bk138 committed Dec 15, 2024
1 parent 8d9bbce commit 3d9e327
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ cmake_minimum_required(VERSION 3.13)
project(multivnc VERSION 0.8.0)
set (CMAKE_CXX_STANDARD 11)

set(LOCALE_DOMAIN ${CMAKE_PROJECT_NAME})

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(CMAKE_GENERATOR MATCHES "Unix Makefiles|Ninja")
# some LSP servers expect compile_commands.json in the project root
Expand All @@ -16,31 +14,47 @@ add_custom_target(
)
endif(CMAKE_GENERATOR MATCHES "Unix Makefiles|Ninja")

# all the build configuration switches
configure_file(config.h.cmake_in config.h)


#
# dependencies
#

option(BUILD_SHARED_LIBS "Build shared libraries" OFF)

configure_file(config.h.cmake_in config.h)

set(WXSERVDISC_INSTALL OFF CACHE BOOL "Set to OFF to not include wxservdisc artifacts in install")
add_subdirectory(libwxservdisc/src)
set(LIBVNCSERVER_INSTALL OFF CACHE BOOL "Set to OFF to not include libvncserver artifacts in install")
set(WITH_EXAMPLES OFF CACHE BOOL "Set to OFF to not build libvncserver examples")
add_subdirectory(libvncserver)

add_subdirectory(src)

find_package(Gettext)
#
# source proper
#

add_subdirectory(src)


#
# install directives
# l18n
#

set(LOCALE_DOMAIN ${CMAKE_PROJECT_NAME})

find_package(Gettext)

GETTEXT_PROCESS_PO_FILES(de ALL PO_FILES po/de.po)
GETTEXT_PROCESS_PO_FILES(es ALL PO_FILES po/es.po)
GETTEXT_PROCESS_PO_FILES(sv ALL PO_FILES po/sv.po)


#
# install directives
#

if(UNIX AND NOT APPLE)
include(GNUInstallDirs)
install(TARGETS multivnc RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand Down

0 comments on commit 3d9e327

Please sign in to comment.