From 7eb33ca653c08d48923634d67a8206ee8980a8a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= Date: Tue, 17 Feb 2015 14:27:07 +0200 Subject: [PATCH] CMake: Added projects for plugins, bundling for OS X --- doomsday/apps/plugins/CMakeLists.txt | 24 +- doomsday/apps/plugins/PluginConfig.cmake | 24 +- doomsday/apps/plugins/common/Common.cmake | 3 + doomsday/apps/plugins/dehread/CMakeLists.txt | 8 + doomsday/apps/plugins/doom/CMakeLists.txt | 17 ++ doomsday/apps/plugins/doom64/CMakeLists.txt | 17 ++ doomsday/apps/plugins/example/CMakeLists.txt | 2 + .../apps/plugins/fluidsynth/CMakeLists.txt | 252 ++++++++++++++++++ doomsday/apps/plugins/fmod/CMakeLists.txt | 29 ++ doomsday/apps/plugins/heretic/CMakeLists.txt | 17 ++ doomsday/apps/plugins/hexen/CMakeLists.txt | 17 ++ .../plugins/idtech1converter/CMakeLists.txt | 10 + .../plugins/savegameconverter/CMakeLists.txt | 8 + doomsday/apps/server/CMakeLists.txt | 2 +- doomsday/build/scripts/packres.py | 2 +- doomsday/cmake/Config.cmake | 1 + doomsday/cmake/FindAmethyst.cmake | 12 +- doomsday/cmake/FindAssimp.cmake | 16 +- doomsday/cmake/FindCcache.cmake | 4 +- doomsday/cmake/FindFMOD.cmake | 22 ++ doomsday/cmake/FindGlib.cmake | 41 +++ doomsday/cmake/FindQt.cmake | 2 +- doomsday/cmake/LegacyPK3s.cmake | 34 +++ doomsday/cmake/MacOSXBundleInfo.plist.in | 2 + .../cmake/MacOSXPluginBundleInfo.plist.in | 32 +++ doomsday/cmake/Macros.cmake | 99 ++++++- doomsday/cmake/OpenGL.cmake | 16 +- doomsday/cmake/Version.cmake | 2 + doomsday/sdk/libappfw/CMakeLists.txt | 4 +- doomsday/sdk/libgui/CMakeLists.txt | 7 +- doomsday/tests/TestConfig.cmake | 5 +- doomsday/tests/test_glsandbox/CMakeLists.txt | 3 +- doomsday/tools/amethyst/CMakeLists.txt | 1 + doomsday/tools/doomsdayscript/CMakeLists.txt | 1 + doomsday/tools/md2tool/CMakeLists.txt | 1 + doomsday/tools/savegametool/CMakeLists.txt | 1 + doomsday/tools/shell-text/CMakeLists.txt | 3 +- doomsday/tools/texc/CMakeLists.txt | 1 + doomsday/tools/wadtool/CMakeLists.txt | 1 + 39 files changed, 675 insertions(+), 68 deletions(-) create mode 100644 doomsday/apps/plugins/common/Common.cmake create mode 100644 doomsday/apps/plugins/dehread/CMakeLists.txt create mode 100644 doomsday/apps/plugins/doom/CMakeLists.txt create mode 100644 doomsday/apps/plugins/doom64/CMakeLists.txt create mode 100644 doomsday/apps/plugins/fluidsynth/CMakeLists.txt create mode 100644 doomsday/apps/plugins/fmod/CMakeLists.txt create mode 100644 doomsday/apps/plugins/heretic/CMakeLists.txt create mode 100644 doomsday/apps/plugins/hexen/CMakeLists.txt create mode 100644 doomsday/apps/plugins/idtech1converter/CMakeLists.txt create mode 100644 doomsday/apps/plugins/savegameconverter/CMakeLists.txt create mode 100644 doomsday/cmake/FindFMOD.cmake create mode 100644 doomsday/cmake/FindGlib.cmake create mode 100644 doomsday/cmake/LegacyPK3s.cmake create mode 100644 doomsday/cmake/MacOSXPluginBundleInfo.plist.in diff --git a/doomsday/apps/plugins/CMakeLists.txt b/doomsday/apps/plugins/CMakeLists.txt index 3a80d9d65d..162df26cd1 100644 --- a/doomsday/apps/plugins/CMakeLists.txt +++ b/doomsday/apps/plugins/CMakeLists.txt @@ -7,17 +7,19 @@ include (../../cmake/Config.cmake) add_subdirectory (example) -# add_subdirectory (idtech1converter) -# add_subdirectory (savegameconverter) -# add_subdirectory (dehread) -# -# add_subdirectory (doom) -# add_subdirectory (heretic) -# add_subdirectory (hexen) -# add_subdirectory (doom64) -# -# add_subdirectory (fmod) -# add_subdirectory (fluidsynth) +add_subdirectory (idtech1converter) +add_subdirectory (savegameconverter) +add_subdirectory (dehread) + +add_subdirectory (doom) +add_subdirectory (heretic) +add_subdirectory (hexen) +add_subdirectory (doom64) + +add_subdirectory (fmod) +if (NOT WIN32) + add_subdirectory (fluidsynth) +endif () # add_subdirectory (openal) # # # Platform-specific plugins. diff --git a/doomsday/apps/plugins/PluginConfig.cmake b/doomsday/apps/plugins/PluginConfig.cmake index 6e7ca30db2..f33e9aab6c 100644 --- a/doomsday/apps/plugins/PluginConfig.cmake +++ b/doomsday/apps/plugins/PluginConfig.cmake @@ -6,17 +6,29 @@ project (DENG_PLUGINS) include (${CMAKE_CURRENT_LIST_DIR}/../../cmake/Config.cmake) find_package (DengDoomsday QUIET) +find_package (LZSS) macro (deng_add_plugin target) sublist (_src 1 -1 ${ARGV}) - add_library (${target} SHARED ${_src}) - target_link_libraries (${target} Deng::libdoomsday) + add_library (${target} MODULE ${_src} ${DENG_RESOURCES}) + target_include_directories (${target} PUBLIC ${DENG_API_DIR}) + target_link_libraries (${target} + PUBLIC Deng::libdoomsday + PRIVATE lzss + ) enable_cxx11 (${target}) + set_target_properties (${target} PROPERTIES FOLDER Plugins) if (APPLE) - set_property (TARGET ${target} PROPERTY BUNDLE ON) + set_target_properties (${target} PROPERTIES + BUNDLE ON + MACOSX_BUNDLE_INFO_PLIST ${DENG_SOURCE_DIR}/cmake/MacOSXPluginBundleInfo.plist.in + ) + set (MACOSX_BUNDLE_BUNDLE_NAME "net.dengine.plugin.${target}") + set (MACOSX_BUNDLE_BUNDLE_EXECUTABLE "${target}.bundle/Contents/MacOS/${target}") + deng_bundle_resources () + else () + set_target_properties (${target} VERSION ${DENG_VERSION}) endif () - install (TARGETS ${target} - LIBRARY DESTINATION ${DENG_INSTALL_PLUGIN_DIR} - ) + install (TARGETS ${target} LIBRARY DESTINATION ${DENG_INSTALL_PLUGIN_DIR}) set (_src) endmacro (deng_add_plugin) diff --git a/doomsday/apps/plugins/common/Common.cmake b/doomsday/apps/plugins/common/Common.cmake new file mode 100644 index 0000000000..35d00dda69 --- /dev/null +++ b/doomsday/apps/plugins/common/Common.cmake @@ -0,0 +1,3 @@ +set (DIR ${CMAKE_CURRENT_LIST_DIR}) +include_directories (${DIR}/include) +file (GLOB_RECURSE COMMON_SOURCES ${DIR}/src/* ${DIR}/include/*) diff --git a/doomsday/apps/plugins/dehread/CMakeLists.txt b/doomsday/apps/plugins/dehread/CMakeLists.txt new file mode 100644 index 0000000000..ad2dea7072 --- /dev/null +++ b/doomsday/apps/plugins/dehread/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required (VERSION 3.0) +project (DENG_DEHREAD) +include (../PluginConfig.cmake) + +include_directories (include) +file (GLOB SOURCES src/*.cpp include/*.h) + +deng_add_plugin (dehread ${SOURCES}) diff --git a/doomsday/apps/plugins/doom/CMakeLists.txt b/doomsday/apps/plugins/doom/CMakeLists.txt new file mode 100644 index 0000000000..36871008a0 --- /dev/null +++ b/doomsday/apps/plugins/doom/CMakeLists.txt @@ -0,0 +1,17 @@ +# The Doomsday Engine Project +# Copyright (c) 2015 Jaakko Keränen + +cmake_minimum_required (VERSION 3.0) +project (DENG_DOOM) +set (DENG_ENABLE_PK3S ON) # uses the legacy libdoom.pk3 +include (../PluginConfig.cmake) +include (../common/Common.cmake) + +add_definitions (-D__JDOOM__) + +include_directories (include) +file (GLOB SOURCES src/*.c src/*.cpp include/*.h) + +deng_find_resources (libdoom.pk3) + +deng_add_plugin (doom ${SOURCES} ${COMMON_SOURCES}) diff --git a/doomsday/apps/plugins/doom64/CMakeLists.txt b/doomsday/apps/plugins/doom64/CMakeLists.txt new file mode 100644 index 0000000000..7b2c2022fc --- /dev/null +++ b/doomsday/apps/plugins/doom64/CMakeLists.txt @@ -0,0 +1,17 @@ +# The Doomsday Engine Project +# Copyright (c) 2015 Jaakko Keränen + +cmake_minimum_required (VERSION 3.0) +project (DENG_DOOM64) +set (DENG_ENABLE_PK3S ON) # uses the legacy libdoom.pk3 +include (../PluginConfig.cmake) +include (../common/Common.cmake) + +add_definitions (-D__JDOOM64__) + +include_directories (include) +file (GLOB SOURCES src/*.c src/*.cpp include/*.h) + +deng_find_resources (libdoom64.pk3) + +deng_add_plugin (doom64 ${SOURCES} ${COMMON_SOURCES}) diff --git a/doomsday/apps/plugins/example/CMakeLists.txt b/doomsday/apps/plugins/example/CMakeLists.txt index 255979f49c..a79642fd23 100644 --- a/doomsday/apps/plugins/example/CMakeLists.txt +++ b/doomsday/apps/plugins/example/CMakeLists.txt @@ -5,4 +5,6 @@ cmake_minimum_required (VERSION 3.0) project (DENG_EXAMPLE) include (../PluginConfig.cmake) +include_directories (include) + deng_add_plugin (example src/example.c include/version.h) diff --git a/doomsday/apps/plugins/fluidsynth/CMakeLists.txt b/doomsday/apps/plugins/fluidsynth/CMakeLists.txt new file mode 100644 index 0000000000..56a6595aa4 --- /dev/null +++ b/doomsday/apps/plugins/fluidsynth/CMakeLists.txt @@ -0,0 +1,252 @@ +# The Doomsday Engine Project +# Copyright (c) 2011-2015 Jaakko Keränen + +cmake_minimum_required (VERSION 3.0) +project (DENG_FLUIDSYNTH) +include (../PluginConfig.cmake) + +find_package (PkgConfig) + +set (tgt audio_fluidsynth) + +# Make an embedded build by default? +if (APPLE) + set (embed ON) +elseif (UNIX) + set (embed OFF) +endif () + +option (DENG_FLUIDSYNTH_EMBEDDED + "Compile FluidSynth as part of the ${tgt} plugin" ${embed} +) + +if (DENG_FLUIDSYNTH_EMBEDDED) + find_package (Glib) + + # Bundle library dependencies on OS X. + foreach (fn ${GLIB_LIBRARIES}) + list (APPEND macRes ${fn},Frameworks) + endforeach () + deng_find_resources (${macRes}) + + add_definitions ( + -D_BSD_SOURCE -DFLUIDSYNTH_NOT_A_DLL -DWITH_FLOAT + -DHAVE_MATH_H -DHAVE_STDIO_H -DHAVE_STDLIB_H -DHAVE_STRING_H + ) + if (UNIX) + add_definitions ( + -DHAVE_SYS_TYPES_H -DHAVE_SYS_SOCKET_H -DHAVE_SYS_TIME_H + -DHAVE_PTHREAD_H -DHAVE_LIMITS_H -DHAVE_UNISTD_H + -DHAVE_NETINET_IN_H -DHAVE_NETINET_TCP_H + -DHAVE_FCNTL_H -DHAVE_ERRNO_H + ) + endif () + if (APPLE) + add_definitions (-DDARWIN) + endif () + + set (FS_DIR ${DENG_EXTERNAL_SOURCE_DIR}/fluidsynth) + include_directories ( + ${FS_DIR}/include + ${FS_DIR}/src + ${FS_DIR}/src/drivers + ${FS_DIR}/src/synth + ${FS_DIR}/src/rvoice + ${FS_DIR}/src/midi + ${FS_DIR}/src/utils + ${FS_DIR}/src/sfloader + ${FS_DIR}/src/bindings + ) + set (SOURCES + ${FS_DIR}/src/utils/fluid_conv.c + ${FS_DIR}/src/utils/fluid_hash.c + ${FS_DIR}/src/utils/fluid_list.c + ${FS_DIR}/src/utils/fluid_ringbuffer.c + ${FS_DIR}/src/utils/fluid_settings.c + ${FS_DIR}/src/utils/fluid_sys.c + ${FS_DIR}/src/sfloader/fluid_defsfont.c + ${FS_DIR}/src/sfloader/fluid_ramsfont.c + ${FS_DIR}/src/rvoice/fluid_adsr_env.c + ${FS_DIR}/src/rvoice/fluid_chorus.c + ${FS_DIR}/src/rvoice/fluid_iir_filter.c + ${FS_DIR}/src/rvoice/fluid_lfo.c + ${FS_DIR}/src/rvoice/fluid_rvoice.c + ${FS_DIR}/src/rvoice/fluid_rvoice_dsp.c + ${FS_DIR}/src/rvoice/fluid_rvoice_event.c + ${FS_DIR}/src/rvoice/fluid_rvoice_mixer.c + ${FS_DIR}/src/rvoice/fluid_rev.c + ${FS_DIR}/src/synth/fluid_chan.c + ${FS_DIR}/src/synth/fluid_event.c + ${FS_DIR}/src/synth/fluid_gen.c + ${FS_DIR}/src/synth/fluid_mod.c + ${FS_DIR}/src/synth/fluid_synth.c + ${FS_DIR}/src/synth/fluid_tuning.c + ${FS_DIR}/src/synth/fluid_voice.c + ${FS_DIR}/src/midi/fluid_midi.c + ${FS_DIR}/src/midi/fluid_midi_router.c + ${FS_DIR}/src/midi/fluid_seqbind.c + ${FS_DIR}/src/midi/fluid_seq.c + ${FS_DIR}/src/drivers/fluid_adriver.c + ${FS_DIR}/src/drivers/fluid_mdriver.c + ${FS_DIR}/src/drivers/fluid_aufile.c + ${FS_DIR}/src/bindings/fluid_cmd.c + ${FS_DIR}/src/bindings/fluid_filerenderer.c + ) + +else () + # We will use the libfluidsynth installed on the system. + pkg_check_modules (FLUIDSYNTH fluidsynth) + if (NOT FLUIDSYNTH_FOUND) + message (STATUS "Skipping ${tgt} because libfluidsynth not found (using pkg-config)") + return () + endif () + + add_definitions (-DFLUIDSYNTH_DEFAULT_DRIVER_NAME="pulseaudio") +endif () + +append (CMAKE_CXX_FLAGS_DEBUG "-DDENG_DSFLUIDSYNTH_DEBUG") + +include_directories (include) +file (GLOB src src/*.cpp include/*.h) + +deng_add_plugin (${tgt} ${src} ${SOURCES}) + +# Additional compiler options. +if (DENG_FLUIDSYNTH_EMBEDDED) + target_link_libraries (${tgt} PRIVATE glib) + if (CMAKE_C_COMPILER_ID MATCHES "GNU") + target_compile_options (${tgt} PRIVATE + -fomit-frame-pointer -funroll-all-loops -finline-functions -fdiagnostics-show-option + -Wno-deprecated-declarations + ) + endif () + if (CMAKE_C_COMPILER_ID MATCHES ".*Clang") + target_compile_options (${tgt} PRIVATE + -fomit-frame-pointer -finline-functions -fdiagnostics-show-option + -Wno-deprecated-declarations -Wno-parentheses -Wno-unused-value + ) + endif () + + if (APPLE) + + endif () +endif () + +# win32 { +# RC_FILE = res/fluidsynth.rc +# +# QMAKE_LFLAGS += /DEF:\"$$PWD/api/dsfluidsynth.def\" +# OTHER_FILES += api/dsfluidsynth.def +# } + +# libfluidsynth config ------------------------------------------------------ + +# +# FS_DIR = ../../external/fluidsynth +# +# INCLUDEPATH += \ +# $${FS_DIR}/include \ +# $${FS_DIR}/src \ +# $${FS_DIR}/src/drivers \ +# $${FS_DIR}/src/synth \ +# $${FS_DIR}/src/rvoice \ +# $${FS_DIR}/src/midi \ +# $${FS_DIR}/src/utils \ +# $${FS_DIR}/src/sfloader \ +# $${FS_DIR}/src/bindings +# +# fsh.files = $${FS_DIR}/include/fluidsynth.h +# +# headers.files = \ +# $${FS_DIR}/include/fluidsynth/audio.h \ +# $${FS_DIR}/include/fluidsynth/event.h \ +# $${FS_DIR}/include/fluidsynth/gen.h \ +# $${FS_DIR}/include/fluidsynth/log.h \ +# $${FS_DIR}/include/fluidsynth/midi.h \ +# $${FS_DIR}/include/fluidsynth/misc.h \ +# $${FS_DIR}/include/fluidsynth/mod.h \ +# $${FS_DIR}/include/fluidsynth/ramsfont.h \ +# $${FS_DIR}/include/fluidsynth/seq.h \ +# $${FS_DIR}/include/fluidsynth/seqbind.h \ +# $${FS_DIR}/include/fluidsynth/settings.h \ +# $${FS_DIR}/include/fluidsynth/sfont.h \ +# $${FS_DIR}/include/fluidsynth/shell.h \ +# $${FS_DIR}/include/fluidsynth/synth.h \ +# $${FS_DIR}/include/fluidsynth/types.h \ +# $${FS_DIR}/include/fluidsynth/voice.h \ +# $${FS_DIR}/include/fluidsynth/version.h +# +# HEADERS += $$fsh.files $$headers.files +# +# # Internal headers. +# HEADERS += \ +# $${FS_DIR}/src/config.h \ +# $${FS_DIR}/src/utils/fluid_conv.h \ +# $${FS_DIR}/src/utils/fluid_hash.h \ +# $${FS_DIR}/src/utils/fluid_list.h \ +# $${FS_DIR}/src/utils/fluid_ringbuffer.h \ +# $${FS_DIR}/src/utils/fluid_settings.h \ +# $${FS_DIR}/src/utils/fluidsynth_priv.h \ +# $${FS_DIR}/src/utils/fluid_sys.h \ +# $${FS_DIR}/src/sfloader/fluid_defsfont.h \ +# $${FS_DIR}/src/sfloader/fluid_ramsfont.h \ +# $${FS_DIR}/src/sfloader/fluid_sfont.h \ +# $${FS_DIR}/src/rvoice/fluid_adsr_env.h \ +# $${FS_DIR}/src/rvoice/fluid_chorus.h \ +# $${FS_DIR}/src/rvoice/fluid_iir_filter.h \ +# $${FS_DIR}/src/rvoice/fluid_lfo.h \ +# $${FS_DIR}/src/rvoice/fluid_rvoice.h \ +# $${FS_DIR}/src/rvoice/fluid_rvoice_event.h \ +# $${FS_DIR}/src/rvoice/fluid_rvoice_mixer.h \ +# $${FS_DIR}/src/rvoice/fluid_phase.h \ +# $${FS_DIR}/src/rvoice/fluid_rev.h \ +# $${FS_DIR}/src/synth/fluid_chan.h \ +# $${FS_DIR}/src/synth/fluid_event_priv.h \ +# $${FS_DIR}/src/synth/fluid_event_queue.h \ +# $${FS_DIR}/src/synth/fluid_gen.h \ +# $${FS_DIR}/src/synth/fluid_mod.h \ +# $${FS_DIR}/src/synth/fluid_synth.h \ +# $${FS_DIR}/src/synth/fluid_tuning.h \ +# $${FS_DIR}/src/synth/fluid_voice.h \ +# $${FS_DIR}/src/midi/fluid_midi.h \ +# $${FS_DIR}/src/midi/fluid_midi_router.h \ +# $${FS_DIR}/src/drivers/fluid_adriver.h \ +# $${FS_DIR}/src/drivers/fluid_mdriver.h \ +# $${FS_DIR}/src/bindings/fluid_cmd.h +# +# SOURCES += \ +# $${FS_DIR}/src/utils/fluid_conv.c \ +# $${FS_DIR}/src/utils/fluid_hash.c \ +# $${FS_DIR}/src/utils/fluid_list.c \ +# $${FS_DIR}/src/utils/fluid_ringbuffer.c \ +# $${FS_DIR}/src/utils/fluid_settings.c \ +# $${FS_DIR}/src/utils/fluid_sys.c \ +# $${FS_DIR}/src/sfloader/fluid_defsfont.c \ +# $${FS_DIR}/src/sfloader/fluid_ramsfont.c \ +# $${FS_DIR}/src/rvoice/fluid_adsr_env.c \ +# $${FS_DIR}/src/rvoice/fluid_chorus.c \ +# $${FS_DIR}/src/rvoice/fluid_iir_filter.c \ +# $${FS_DIR}/src/rvoice/fluid_lfo.c \ +# $${FS_DIR}/src/rvoice/fluid_rvoice.c \ +# $${FS_DIR}/src/rvoice/fluid_rvoice_dsp.c \ +# $${FS_DIR}/src/rvoice/fluid_rvoice_event.c \ +# $${FS_DIR}/src/rvoice/fluid_rvoice_mixer.c \ +# $${FS_DIR}/src/rvoice/fluid_rev.c \ +# $${FS_DIR}/src/synth/fluid_chan.c \ +# $${FS_DIR}/src/synth/fluid_event.c \ +# $${FS_DIR}/src/synth/fluid_gen.c \ +# $${FS_DIR}/src/synth/fluid_mod.c \ +# $${FS_DIR}/src/synth/fluid_synth.c \ +# $${FS_DIR}/src/synth/fluid_tuning.c \ +# $${FS_DIR}/src/synth/fluid_voice.c \ +# $${FS_DIR}/src/midi/fluid_midi.c \ +# $${FS_DIR}/src/midi/fluid_midi_router.c \ +# $${FS_DIR}/src/midi/fluid_seqbind.c \ +# $${FS_DIR}/src/midi/fluid_seq.c \ +# $${FS_DIR}/src/drivers/fluid_adriver.c \ +# $${FS_DIR}/src/drivers/fluid_mdriver.c \ +# $${FS_DIR}/src/drivers/fluid_aufile.c \ +# $${FS_DIR}/src/bindings/fluid_cmd.c \ +# $${FS_DIR}/src/bindings/fluid_filerenderer.c +# +# } # deng_embedfluidsynth diff --git a/doomsday/apps/plugins/fmod/CMakeLists.txt b/doomsday/apps/plugins/fmod/CMakeLists.txt new file mode 100644 index 0000000000..888becbe26 --- /dev/null +++ b/doomsday/apps/plugins/fmod/CMakeLists.txt @@ -0,0 +1,29 @@ +# The Doomsday Engine Project +# Copyright (c) 2015 Jaakko Keränen + +cmake_minimum_required (VERSION 3.0) +project (DENG_FMOD) +include (../PluginConfig.cmake) + +find_package (FMOD QUIET) + +if (FMOD_FOUND) + # Deploy the FMOD library. + get_property (libPath TARGET fmodex PROPERTY INTERFACE_LINK_LIBRARIES) + if (APPLE) + deng_find_resources (${libPath},Frameworks) + else () + install (FILES ${libPath} DESTINATION ${DENG_INSTALL_PLUGIN_DIR}) + endif () + + append (CMAKE_CXX_FLAGS_DEBUG "-DDENG_DSFMOD_DEBUG") + + include_directories (include) + file (GLOB SOURCES src/*.cpp include/*.h) + deng_add_plugin (audio_fmod ${SOURCES}) + target_link_libraries (audio_fmod PRIVATE fmodex) + + if (APPLE) + deng_bundle_install_names (audio_fmod ${libPath}) + endif () +endif () diff --git a/doomsday/apps/plugins/heretic/CMakeLists.txt b/doomsday/apps/plugins/heretic/CMakeLists.txt new file mode 100644 index 0000000000..153400e631 --- /dev/null +++ b/doomsday/apps/plugins/heretic/CMakeLists.txt @@ -0,0 +1,17 @@ +# The Doomsday Engine Project +# Copyright (c) 2015 Jaakko Keränen + +cmake_minimum_required (VERSION 3.0) +project (DENG_HERETIC) +set (DENG_ENABLE_PK3S ON) # uses the legacy libdoom.pk3 +include (../PluginConfig.cmake) +include (../common/Common.cmake) + +add_definitions (-D__JHERETIC__) + +include_directories (include) +file (GLOB SOURCES src/*.c src/*.cpp include/*.h) + +deng_find_resources (libheretic.pk3) + +deng_add_plugin (heretic ${SOURCES} ${COMMON_SOURCES}) diff --git a/doomsday/apps/plugins/hexen/CMakeLists.txt b/doomsday/apps/plugins/hexen/CMakeLists.txt new file mode 100644 index 0000000000..1a47a57ba5 --- /dev/null +++ b/doomsday/apps/plugins/hexen/CMakeLists.txt @@ -0,0 +1,17 @@ +# The Doomsday Engine Project +# Copyright (c) 2015 Jaakko Keränen + +cmake_minimum_required (VERSION 3.0) +project (DENG_HEXEN) +set (DENG_ENABLE_PK3S ON) # uses the legacy libdoom.pk3 +include (../PluginConfig.cmake) +include (../common/Common.cmake) + +add_definitions (-D__JHEXEN__) + +include_directories (include) +file (GLOB SOURCES src/*.c src/*.cpp include/*.h) + +deng_find_resources (libhexen.pk3) + +deng_add_plugin (hexen ${SOURCES} ${COMMON_SOURCES}) diff --git a/doomsday/apps/plugins/idtech1converter/CMakeLists.txt b/doomsday/apps/plugins/idtech1converter/CMakeLists.txt new file mode 100644 index 0000000000..c6965729ff --- /dev/null +++ b/doomsday/apps/plugins/idtech1converter/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required (VERSION 3.0) +project (DENG_IDTECH1CONVERTER) +include (../PluginConfig.cmake) + +append (CMAKE_CXX_FLAGS_DEBUG "-DDENG_IDTECH1CONVERTER_DEBUG") + +include_directories (include) +file (GLOB SOURCES src/*.cpp include/*.h) + +deng_add_plugin (idtech1converter ${SOURCES}) diff --git a/doomsday/apps/plugins/savegameconverter/CMakeLists.txt b/doomsday/apps/plugins/savegameconverter/CMakeLists.txt new file mode 100644 index 0000000000..930e0da070 --- /dev/null +++ b/doomsday/apps/plugins/savegameconverter/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required (VERSION 3.0) +project (DENG_SAVEGAMECONVERTER) +include (../PluginConfig.cmake) + +include_directories (include) +file (GLOB SOURCES src/*.cpp include/*.h) + +deng_add_plugin (savegameconverter ${SOURCES}) diff --git a/doomsday/apps/server/CMakeLists.txt b/doomsday/apps/server/CMakeLists.txt index e42c650777..efea989edb 100644 --- a/doomsday/apps/server/CMakeLists.txt +++ b/doomsday/apps/server/CMakeLists.txt @@ -251,7 +251,7 @@ if (UNIX) set (DOC_DIR ${DENG_SOURCE_DIR}/doc/server) add_custom_command ( OUTPUT ${MAN_PAGE} - COMMAND "${AMETHYST}" -dMAN -dUNIX -odoomsday-server.6 ${DOC_DIR}/server.ame + COMMAND "${AMETHYST_EXECUTABLE}" -dMAN -dUNIX -odoomsday-server.6 ${DOC_DIR}/server.ame DEPENDS ${DOC_DIR}/server.ame ${DOC_DIR}/manpage.ame COMMENT "Compiling manual page..." ) diff --git a/doomsday/build/scripts/packres.py b/doomsday/build/scripts/packres.py index 21818996bf..11a518c2ff 100755 --- a/doomsday/build/scripts/packres.py +++ b/doomsday/build/scripts/packres.py @@ -16,7 +16,7 @@ sys.argv.remove('--quiet') quietMode = True -deng_dir = os.path.join('..', '..') +deng_dir = os.path.join('..', '..', 'apps') target_dir = os.path.abspath(sys.argv[1]) class Pack: diff --git a/doomsday/cmake/Config.cmake b/doomsday/cmake/Config.cmake index bb6e261e76..9bba6003ce 100644 --- a/doomsday/cmake/Config.cmake +++ b/doomsday/cmake/Config.cmake @@ -67,3 +67,4 @@ set (Python_ADDITIONAL_VERSIONS 2.7) find_package (PythonInterp REQUIRED) include (cotire) +include (LegacyPK3s) diff --git a/doomsday/cmake/FindAmethyst.cmake b/doomsday/cmake/FindAmethyst.cmake index b6bbff687e..fd0e92f2ca 100644 --- a/doomsday/cmake/FindAmethyst.cmake +++ b/doomsday/cmake/FindAmethyst.cmake @@ -1,11 +1,11 @@ -if (NOT DEFINED AMETHYST) - find_program (AMETHYST amethyst +if (NOT DEFINED AMETHYST_EXECUTABLE) + find_program (AMETHYST_EXECUTABLE amethyst DOC "Amethyst document processor executable" ) - mark_as_advanced (AMETHYST) - message (STATUS "Found Amethyst: ${AMETHYST}") + mark_as_advanced (AMETHYST_EXECUTABLE) + message (STATUS "Found Amethyst: ${AMETHYST_EXECUTABLE}") endif () -if (NOT AMETHYST STREQUAL AMETHYST-NOTFOUND) - set (AMETHYST_FOUND 1) +if (NOT AMETHYST_EXECUTABLE STREQUAL AMETHYST_EXECUTABLE-NOTFOUND) + set (AMETHYST_FOUND YES) endif () diff --git a/doomsday/cmake/FindAssimp.cmake b/doomsday/cmake/FindAssimp.cmake index 0b85a53c57..7bfa0798a9 100644 --- a/doomsday/cmake/FindAssimp.cmake +++ b/doomsday/cmake/FindAssimp.cmake @@ -1,13 +1,11 @@ find_package (PkgConfig) pkg_check_modules (ASSIMP REQUIRED assimp) +find_library (LIBASSIMP ${ASSIMP_LIBRARIES} HINTS ${ASSIMP_LIBRARY_DIRS}) +mark_as_advanced (LIBASSIMP) -include_directories (${ASSIMP_INCLUDE_DIRS}) -link_directories (${ASSIMP_LIBRARY_DIRS}) - -macro (target_link_assimp target) - target_link_libraries (${target} PUBLIC ${ASSIMP_LIBRARIES}) - set_property (TARGET ${target} - PROPERTY INTERFACE_LINK_LIBRARIES "-L${ASSIMP_LIBRARY_DIRS}" - ) -endmacro (target_link_assimp) +if (NOT TARGET assimp) + add_library (assimp INTERFACE) + target_include_directories (assimp INTERFACE ${ASSIMP_INCLUDE_DIRS}) + target_link_libraries (assimp INTERFACE ${LIBASSIMP}) +endif () diff --git a/doomsday/cmake/FindCcache.cmake b/doomsday/cmake/FindCcache.cmake index 4cca033dab..6040dcff1e 100644 --- a/doomsday/cmake/FindCcache.cmake +++ b/doomsday/cmake/FindCcache.cmake @@ -1,6 +1,6 @@ -find_program (CCACHE_PATH ccache) +find_program (CCACHE_EXECUTABLE ccache) -if (NOT CCACHE_PATH STREQUAL "CCACHE_PATH-NOTFOUND") +if (NOT CCACHE_EXECUTABLE STREQUAL "CCACHE_EXECUTABLE-NOTFOUND") set (CCACHE_FOUND YES) set (CCACHE_OPTION_DEFAULT ON) else () diff --git a/doomsday/cmake/FindFMOD.cmake b/doomsday/cmake/FindFMOD.cmake new file mode 100644 index 0000000000..037e956d14 --- /dev/null +++ b/doomsday/cmake/FindFMOD.cmake @@ -0,0 +1,22 @@ +set (FMOD_DIR "FMOD Programmers API" CACHE PATH + "Location of the FMOD Programmer's API SDK" +) + +if (NOT FMOD_FOUND) + get_filename_component (fullPath "${FMOD_DIR}" ABSOLUTE) + if (EXISTS "${fullPath}/api") + set (FMOD_FOUND YES CACHE BOOL "FMOD SDK found") + mark_as_advanced (FMOD_FOUND) + message (STATUS "Found FMOD: ${FMOD_DIR}") + endif () +endif () + +if (FMOD_FOUND AND NOT TARGET fmodex) + add_library (fmodex INTERFACE) + target_include_directories (fmodex INTERFACE ${FMOD_DIR}/api/inc) + if (APPLE) + target_link_libraries (fmodex INTERFACE + ${FMOD_DIR}/api/lib/libfmodex.dylib + ) + endif () +endif () diff --git a/doomsday/cmake/FindGlib.cmake b/doomsday/cmake/FindGlib.cmake new file mode 100644 index 0000000000..6941804ae1 --- /dev/null +++ b/doomsday/cmake/FindGlib.cmake @@ -0,0 +1,41 @@ +find_package (PkgConfig) + +add_pkgconfig_interface_library (glib glib-2.0 gthread-2.0) + +get_property (GLIB_LIBRARIES TARGET glib + PROPERTY INTERFACE_LINK_LIBRARIES +) + +#-------- +# +# pkg_check_modules (GLIB REQUIRED glib-2.0) +# pkg_check_modules (GTHREAD REQUIRED gthread-2.0) +# +# # Locate full paths of the required shared libraries. +# set (libNames ${GLIB_LIBRARIES} ${GTHREAD_LIBRARIES}) +# list (REMOVE_DUPLICATES libNames) +# foreach (lib ${libNames}) +# find_library (path ${lib} HINTS ${GLIB_LIBRARY_DIRS};${GTHREAD_LIBRARY_DIRS}) +# list (APPEND libs ${path}) +# unset (path CACHE) +# endforeach (lib) +# +# # set (incDirs ${GLIB_INCLUDE_DIRS} ${GTHREAD_INCLUDE_DIRS}) +# # list (REMOVE_DUPLICATES incDirs) +# +# # Define an interface library for GLib. +# add_library (glib INTERFACE) +# target_compile_options (glib INTERFACE ${GLIB_CFLAGS} ${GTHREAD_CFLAGS}) +# target_link_libraries (glib INTERFACE ${libs}) +# +# unset (GLIB_LIBRARIES CACHE) +# foreach (lib ${libs}) +# get_filename_component (p ${lib} REALPATH) +# list (APPEND GLIB_LIBRARIES ${p}) +# endforeach (lib) +# #message ("GLIB_LIBRARIES: ${GLIB_LIBRARIES}") +# +# # unset (incDirs) +# unset (libNames) +# unset (lib) +# unset (libs) diff --git a/doomsday/cmake/FindQt.cmake b/doomsday/cmake/FindQt.cmake index 6ce32b123e..1774098b5a 100644 --- a/doomsday/cmake/FindQt.cmake +++ b/doomsday/cmake/FindQt.cmake @@ -1,5 +1,5 @@ # Qmake is used to find out the Qt install location. -set (QMAKE qmake CACHE STRING "Path of the qmake binary of the Qt version to use") +set (QMAKE qmake CACHE STRING "Path of the qmake executable to use") # Runs qmake to query one of its configuration variables. function (qmake_query qvar outvar) diff --git a/doomsday/cmake/LegacyPK3s.cmake b/doomsday/cmake/LegacyPK3s.cmake new file mode 100644 index 0000000000..3fb7114fa5 --- /dev/null +++ b/doomsday/cmake/LegacyPK3s.cmake @@ -0,0 +1,34 @@ +# This ensures that the old-style PK3 packages are compiled when CMake is run +# on any CMake project. All of these should be converted to Doomsday 2 packages. + +if (NOT DENG_ENABLE_PK3S OR TARGET doomsday.pk3) + return () +endif () + +set (outDir "${CMAKE_CURRENT_BINARY_DIR}") + +execute_process (COMMAND ${PYTHON_EXECUTABLE} + "${DENG_SOURCE_DIR}/build/scripts/packres.py" + "${outDir}" + WORKING_DIRECTORY "${DENG_SOURCE_DIR}/build/scripts" + OUTPUT_VARIABLE msg + OUTPUT_STRIP_TRAILING_WHITESPACE +) +message (STATUS "Compiling legacy PK3s...") + +macro (deng_add_pk3 target) + add_custom_target (${target} ALL) + set_target_properties (${target} PROPERTIES + LOCATION ${outDir}/${target} + FOLDER Packages + ) + if (NOT APPLE) + install (FILES ${outDir}/${target} DESTINATION ${DENG_INSTALL_DATA_DIR}) + endif () +endmacro (deng_add_pk3) + +deng_add_pk3 (doomsday.pk3) +deng_add_pk3 (libdoom.pk3) +deng_add_pk3 (libheretic.pk3) +deng_add_pk3 (libhexen.pk3) +deng_add_pk3 (libdoom64.pk3) diff --git a/doomsday/cmake/MacOSXBundleInfo.plist.in b/doomsday/cmake/MacOSXBundleInfo.plist.in index 9f20430952..9acef3d2d8 100644 --- a/doomsday/cmake/MacOSXBundleInfo.plist.in +++ b/doomsday/cmake/MacOSXBundleInfo.plist.in @@ -18,6 +18,8 @@ ???? CFBundleVersion ${DENG_VERSION} + NSHumanReadableCopyright + ${DENG_TEAM_COPYRIGHT} NSPrincipalClass NSApplication NSHighResolutionCapable diff --git a/doomsday/cmake/MacOSXPluginBundleInfo.plist.in b/doomsday/cmake/MacOSXPluginBundleInfo.plist.in new file mode 100644 index 0000000000..7eefa73c75 --- /dev/null +++ b/doomsday/cmake/MacOSXPluginBundleInfo.plist.in @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${MACOSX_BUNDLE_BUNDLE_EXECUTABLE} + CFBundleGetInfoString + + CFBundleIconFile + + CFBundleIdentifier + ${MACOSX_BUNDLE_BUNDLE_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLongVersionString + ${DENG_VERSION} + CFBundleName + ${MACOSX_BUNDLE_BUNDLE_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + ${DENG_VERSION} + CFBundleSignature + ???? + CFBundleVersion + ${DENG_VERSION} + NSHumanReadableCopyright + ${DENG_TEAM_COPYRIGHT} + + diff --git a/doomsday/cmake/Macros.cmake b/doomsday/cmake/Macros.cmake index 5bcf3b74c2..19dc03f10a 100644 --- a/doomsday/cmake/Macros.cmake +++ b/doomsday/cmake/Macros.cmake @@ -50,8 +50,8 @@ endmacro (strict_warnings) macro (deng_target_defaults target) set_target_properties (${target} PROPERTIES - VERSION ${DENG_VERSION} - SOVERSION ${DENG_COMPAT_VERSION} + VERSION ${DENG_VERSION} + SOVERSION ${DENG_COMPAT_VERSION} ) if (APPLE) set_property (TARGET ${target} PROPERTY INSTALL_RPATH "@loader_path/../Frameworks") @@ -98,8 +98,14 @@ endfunction (deng_filter_platform_sources) # Set up resource bundling on OS X. # The arguments are a list of resource files/directories with the # destination directory separated by a comma: +# # res/macx/shell.icns,Resources # +# If the destionation is omitted, it defaults to "Resources". +# +# If the file path is the name of an existing target, its location +# is used as the path. +# # DENG_RESOURCES is set to a list of the individual source files # to be added to add_executable(). # @@ -115,6 +121,10 @@ function (deng_find_resources) # No comma means the destination defaults to Resources. set (dest Resources) endif () + if (TARGET ${fn}) + # Use the location of the target. + get_property (fn TARGET ${fn} PROPERTY LOCATION) + endif () set (origFn ${fn}) list (APPEND src ${fn}) if (NOT IS_ABSOLUTE ${fn}) @@ -162,15 +172,18 @@ function (deng_add_package packName) message (FATAL_ERROR "deng_package: \"${outName}\" not found") endif () set (outDir ${CMAKE_CURRENT_BINARY_DIR}) - add_custom_command ( - OUTPUT ${outName} - COMMAND ${PYTHON_EXECUTABLE} - "${DENG_SOURCE_DIR}/build/scripts/buildpackage.py" - ${fullPath} - ${outDir} + execute_process (COMMAND ${PYTHON_EXECUTABLE} + "${DENG_SOURCE_DIR}/build/scripts/buildpackage.py" + ${fullPath} ${outDir} + OUTPUT_VARIABLE msg + OUTPUT_STRIP_TRAILING_WHITESPACE ) + message (STATUS "${msg}") add_custom_target (${packName} ALL DEPENDS ${outName}) - set_property (TARGET ${packName} PROPERTY OUTPUT_NAME "${outDir}/${outName}") + set_target_properties (${packName} PROPERTIES + LOCATION "${outDir}/${outName}" + FOLDER Packages + ) install (FILES ${outDir}/${outName} DESTINATION ${DENG_INSTALL_DATA_DIR}) set (DENG_REQUIRED_PACKAGES ${DENG_REQUIRED_PACKAGES} ${packName} PARENT_SCOPE) endfunction (deng_add_package) @@ -181,7 +194,7 @@ function (deng_find_packages fullPaths) list (REMOVE_DUPLICATES names) foreach (name ${names}) if (TARGET ${name}) - get_property (loc TARGET ${name} PROPERTY OUTPUT_NAME) + get_property (loc TARGET ${name} PROPERTY LOCATION) list (APPEND result ${loc}) else () # Check the installed packages. @@ -257,9 +270,75 @@ macro (deng_add_application target) install (FILES ${pkgs} DESTINATION ${DENG_INSTALL_DATA_DIR}) endif () deng_target_defaults (${target}) + set_property (TARGET ${target} PROPERTY FOLDER Apps) set (src) set (pkgs) set (idx) set (pos) set (extraRes) endmacro (deng_add_application) + +function (add_pkgconfig_interface_library target) + sublist (pkgNames 1 -1 ${ARGV}) + foreach (pkg ${pkgNames}) + set (prefix "PKG_${pkg}") + pkg_check_modules (${prefix} REQUIRED ${pkg}) + # Locate full paths of the required shared libraries. + foreach (lib ${${prefix}_LIBRARIES}) + find_library (path ${lib} HINTS ${${prefix}_LIBRARY_DIRS}) + get_filename_component (path ${path} REALPATH) + list (APPEND libs ${path}) + unset (path CACHE) + set (path) + endforeach (lib) + list (APPEND cflags ${${prefix}_CFLAGS}) + endforeach (pkg) + list (REMOVE_DUPLICATES cflags) + list (REMOVE_DUPLICATES libs) + add_library (${target} INTERFACE) + target_compile_options (${target} INTERFACE ${cflags}) + target_link_libraries (${target} INTERFACE ${libs}) +endfunction (add_pkgconfig_interface_library) + +# Mac OS X ------------------------------------------------------------------- + +function (fix_bundled_install_names binaryFile) + if (NOT EXISTS ${binaryFile}) + message (FATAL_ERROR "fix_bundled_install_names: ${binaryFile} not found") + endif () + sublist (libs 1 -1 ${ARGV}) + find_program (OTOOL_EXECUTABLE otool) + execute_process (COMMAND ${OTOOL_EXECUTABLE} + -L ${binaryFile} + OUTPUT_VARIABLE deps + ) + foreach (fn ${libs}) + get_filename_component (base "${fn}" NAME) + string (REGEX MATCH "([^\n]+/${base}) \\(compatibility version" matched ${deps}) + string (STRIP ${CMAKE_MATCH_1} depPath) + execute_process (COMMAND ${CMAKE_INSTALL_NAME_TOOL} + -change ${depPath} @loader_path/../Frameworks/${base} + ${binaryFile} +) + endforeach (fn) +endfunction (fix_bundled_install_names) + +# Fixes the install names of the listed libraries that have been bundled into +# the target. +macro (deng_bundle_install_names target) + sublist (libs 1 -1 ${ARGV}) + set (scriptName ${target}-postbuild.cmake) + # Correct the install names of the dependent libraries. + file (GENERATE OUTPUT ${scriptName} + CONTENT "\ +set (CMAKE_MODULE_PATH ${DENG_SOURCE_DIR}/cmake)\n\ +set (CMAKE_INSTALL_NAME_TOOL ${CMAKE_INSTALL_NAME_TOOL})\n\ +include (Macros)\n\ +fix_bundled_install_names (${target}.bundle/Contents/MacOS/${target} \"${libs}\")\n") + add_custom_command (TARGET ${target} POST_BUILD + COMMAND ${CMAKE_COMMAND} -P ${scriptName} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) + set (scriptName) + set (libs) +endmacro (deng_bundle_install_names) diff --git a/doomsday/cmake/OpenGL.cmake b/doomsday/cmake/OpenGL.cmake index ad7217c1ab..44be42a734 100644 --- a/doomsday/cmake/OpenGL.cmake +++ b/doomsday/cmake/OpenGL.cmake @@ -1,13 +1,7 @@ find_package (OpenGL REQUIRED) -include_directories (${OPENGL_INCLUDE_DIR}) - -macro (target_link_opengl target) - target_link_libraries (${target} PRIVATE ${OPENGL_LIBRARIES}) -endmacro (target_link_opengl) - -#add_library (OpenGL::OpenGL UNKNOWN IMPORTED) -#set_target_properties (OpenGL::OpenGL PROPERTIES -# INTERFACE_INCLUDE_DIRECTORIES "${OPENGL_INCLUDE_DIR}" -# INTERFACE_LINK_LIBRARIES "${OPENGL_LIBRARIES}" -#) +if (NOT TARGET opengl) + add_library (opengl INTERFACE) + target_include_directories (opengl INTERFACE ${OPENGL_INCLUDE_DIR}) + target_link_libraries (opengl INTERFACE ${OPENGL_LIBRARIES}) +endif () diff --git a/doomsday/cmake/Version.cmake b/doomsday/cmake/Version.cmake index e14066fb00..7ed74d8f8d 100644 --- a/doomsday/cmake/Version.cmake +++ b/doomsday/cmake/Version.cmake @@ -9,6 +9,8 @@ set (DENG_RELEASE_TYPE #Stable ) +set (DENG_TEAM_COPYRIGHT "Copyright (c) 2003-2015 Deng Team") + # Build Configuration -------------------------------------------------------- if (DENG_RELEASE_TYPE STREQUAL "Stable") diff --git a/doomsday/sdk/libappfw/CMakeLists.txt b/doomsday/sdk/libappfw/CMakeLists.txt index 410b13d0b1..f9bc28d328 100644 --- a/doomsday/sdk/libappfw/CMakeLists.txt +++ b/doomsday/sdk/libappfw/CMakeLists.txt @@ -22,8 +22,8 @@ file (GLOB_RECURSE SOURCES src/*.cpp src/*.h) deng_add_library (libappfw ${SOURCES} ${HEADERS}) target_link_libraries (libappfw - PUBLIC Deng::libcore Deng::libgui Deng::libshell Qt5::Widgets Qt5::OpenGL + PUBLIC Deng::libcore Deng::libgui Deng::libshell Qt5::Widgets Qt5::OpenGL + PRIVATE opengl ) -target_link_opengl (libappfw) deng_deploy_library (libappfw DengAppfw) diff --git a/doomsday/sdk/libgui/CMakeLists.txt b/doomsday/sdk/libgui/CMakeLists.txt index 0ed2f06397..32eaa36db2 100644 --- a/doomsday/sdk/libgui/CMakeLists.txt +++ b/doomsday/sdk/libgui/CMakeLists.txt @@ -22,9 +22,10 @@ file (GLOB_RECURSE SOURCES src/*.cpp src/*.h) deng_add_library (libgui ${SOURCES} ${HEADERS}) -target_link_libraries (libgui PUBLIC Deng::libcore Qt5::Gui Qt5::OpenGL) -target_link_opengl (libgui) -target_link_assimp (libgui) +target_link_libraries (libgui + PUBLIC Deng::libcore Qt5::Gui Qt5::OpenGL + PRIVATE opengl assimp +) if (APPLE) link_framework (libgui Cocoa) endif () diff --git a/doomsday/tests/TestConfig.cmake b/doomsday/tests/TestConfig.cmake index a9c9a3e7b7..a5af532f21 100644 --- a/doomsday/tests/TestConfig.cmake +++ b/doomsday/tests/TestConfig.cmake @@ -12,8 +12,9 @@ macro (deng_test target) target_link_libraries (${target} Deng::libcore) enable_cxx11 (${target}) strict_warnings (${target}) - set_property (TARGET ${target} - PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${DENG_INSTALL_LIB_DIR} + set_target_properties (${target} PROPERTIES + INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${DENG_INSTALL_LIB_DIR} + FOLDER Tests ) install (TARGETS ${target} DESTINATION bin) endmacro (deng_test) diff --git a/doomsday/tests/test_glsandbox/CMakeLists.txt b/doomsday/tests/test_glsandbox/CMakeLists.txt index e7d9dea5e9..3c72c01507 100644 --- a/doomsday/tests/test_glsandbox/CMakeLists.txt +++ b/doomsday/tests/test_glsandbox/CMakeLists.txt @@ -14,5 +14,4 @@ deng_add_application (test_glsandbox glsandbox.qrc ) -target_link_libraries (test_glsandbox PRIVATE Deng::libappfw) -target_link_opengl (test_glsandbox) \ No newline at end of file +target_link_libraries (test_glsandbox PRIVATE Deng::libappfw opengl) diff --git a/doomsday/tools/amethyst/CMakeLists.txt b/doomsday/tools/amethyst/CMakeLists.txt index 8243e75c08..de8aa820d2 100644 --- a/doomsday/tools/amethyst/CMakeLists.txt +++ b/doomsday/tools/amethyst/CMakeLists.txt @@ -33,6 +33,7 @@ list (APPEND CMAKE_PREFIX_PATH "${QT_PREFIX_DIR}") file (GLOB SOURCES src/*.cpp src/*.h) add_executable (amethyst ${SOURCES}) +set_property (TARGET amethyst PROPERTY FOLDER Tools) strict_warnings (amethyst) find_package (Qt5Core QUIET) diff --git a/doomsday/tools/doomsdayscript/CMakeLists.txt b/doomsday/tools/doomsdayscript/CMakeLists.txt index e046d53beb..5df9ea851e 100644 --- a/doomsday/tools/doomsdayscript/CMakeLists.txt +++ b/doomsday/tools/doomsdayscript/CMakeLists.txt @@ -8,6 +8,7 @@ include (../../cmake/Config.cmake) find_package (DengCore QUIET) add_executable (doomsdayscript main.cpp) +set_property (TARGET md2tool PROPERTY FOLDER Tools) target_link_libraries (doomsdayscript Deng::libcore) deng_target_defaults (doomsdayscript) diff --git a/doomsday/tools/md2tool/CMakeLists.txt b/doomsday/tools/md2tool/CMakeLists.txt index c018f87f87..661e97d3d7 100644 --- a/doomsday/tools/md2tool/CMakeLists.txt +++ b/doomsday/tools/md2tool/CMakeLists.txt @@ -5,5 +5,6 @@ project (DENG_MD2TOOL) include (../../cmake/Config.cmake) add_executable (md2tool md2tool.c md2tool.h anorms.h) +set_property (TARGET md2tool PROPERTY FOLDER Tools) install (TARGETS md2tool DESTINATION bin) diff --git a/doomsday/tools/savegametool/CMakeLists.txt b/doomsday/tools/savegametool/CMakeLists.txt index 1a1828bd1f..2e53c12e46 100644 --- a/doomsday/tools/savegametool/CMakeLists.txt +++ b/doomsday/tools/savegametool/CMakeLists.txt @@ -12,6 +12,7 @@ find_package (LZSS) file (GLOB SOURCES src/*.cpp src/*.h) add_executable (savegametool ${SOURCES}) +set_property (TARGET savegametool PROPERTY FOLDER Tools) target_link_libraries (savegametool Deng::libcore Deng::liblegacy lzss) deng_target_defaults (savegametool) diff --git a/doomsday/tools/shell-text/CMakeLists.txt b/doomsday/tools/shell-text/CMakeLists.txt index 1fe6abc5ec..c19d15d90a 100644 --- a/doomsday/tools/shell-text/CMakeLists.txt +++ b/doomsday/tools/shell-text/CMakeLists.txt @@ -30,7 +30,7 @@ if (AMETHYST_FOUND) set (DOC_DIR ${DENG_SOURCE_DIR}/doc/shell-text) add_custom_command ( OUTPUT ${MAN_PAGE} - COMMAND "${AMETHYST}" -dMAN -dUNIX -odoomsday-shell-text.6 ${DOC_DIR}/shell-text.ame + COMMAND "${AMETHYST_EXECUTABLE}" -dMAN -dUNIX -odoomsday-shell-text.6 ${DOC_DIR}/shell-text.ame DEPENDS ${DOC_DIR}/shell-text.ame COMMENT "Compiling manual page..." ) @@ -41,6 +41,7 @@ endif () set (tgt doomsday-shell-text) add_executable (${tgt} ${SOURCES}) +set_property (TARGET ${tgt} PROPERTY FOLDER Tools) target_link_libraries (${tgt} Deng::libcore Deng::libshell ${CURSES_LIBRARIES}) deng_target_defaults (${tgt}) diff --git a/doomsday/tools/texc/CMakeLists.txt b/doomsday/tools/texc/CMakeLists.txt index f603eacb02..e180277448 100644 --- a/doomsday/tools/texc/CMakeLists.txt +++ b/doomsday/tools/texc/CMakeLists.txt @@ -5,6 +5,7 @@ project (DENG_TEXC) include (../../cmake/Config.cmake) add_executable (texc import.cpp texc.cpp texc.h) +set_property (TARGET texc PROPERTY FOLDER Tools) set (DOC_DIR ${DENG_INSTALL_DOC_DIR}/texc) install (TARGETS texc DESTINATION bin) diff --git a/doomsday/tools/wadtool/CMakeLists.txt b/doomsday/tools/wadtool/CMakeLists.txt index 2845b97a93..5008b2249c 100644 --- a/doomsday/tools/wadtool/CMakeLists.txt +++ b/doomsday/tools/wadtool/CMakeLists.txt @@ -9,6 +9,7 @@ include (../../cmake/Config.cmake) find_package (DengLegacy QUIET) add_executable (wadtool wadtool.c wadtool.h) +set_property (TARGET wadtool PROPERTY FOLDER Tools) target_link_libraries (wadtool Deng::liblegacy) install (TARGETS wadtool DESTINATION bin)