Destroy the cmake dependency.
This commit is contained in:
parent
e0537b7a68
commit
af91433555
154 changed files with 1647 additions and 2247 deletions
284
CMakeLists.txt
284
CMakeLists.txt
|
@ -1,284 +0,0 @@
|
|||
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
|
||||
project(WorldSpawn C CXX)
|
||||
|
||||
option(BUILD_RADIANT "Build the GUI" ON)
|
||||
option(BUILD_VMAP "Build the Compiler" ON)
|
||||
|
||||
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/install" CACHE PATH "..." FORCE)
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Version
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
# CMake 3.0+ would allow this in project()
|
||||
set(WorldSpawn_VERSION_MAJOR 1)
|
||||
set(WorldSpawn_VERSION_MINOR 1)
|
||||
set(WorldSpawn_VERSION_PATCH 0)
|
||||
set(WorldSpawn_VERSION "${WorldSpawn_VERSION_MAJOR}.${WorldSpawn_VERSION_MINOR}.${WorldSpawn_VERSION_PATCH}")
|
||||
|
||||
#SET(CMAKE_C_COMPILER gcc-9)
|
||||
#SET(CMAKE_CXX_COMPILER g++-9)
|
||||
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/WorldSpawn_MAJOR" ${WorldSpawn_VERSION_MAJOR})
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/WorldSpawn_MINOR" ${WorldSpawn_VERSION_MINOR})
|
||||
file(WRITE "${PROJECT_BINARY_DIR}/WorldSpawn_PATCH" ${WorldSpawn_VERSION_PATCH})
|
||||
|
||||
#set(WorldSpawn_ABOUTMSG "Custom build" CACHE STRING "About message")
|
||||
|
||||
find_package(Git REQUIRED)
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
set(WorldSpawn_VERSION_STRING "${WorldSpawn_VERSION}n")
|
||||
if (GIT_VERSION)
|
||||
set(WorldSpawn_VERSION_STRING "${WorldSpawn_VERSION_STRING}-git-${GIT_VERSION}")
|
||||
endif ()
|
||||
|
||||
message(STATUS "Building ${PROJECT_NAME} ${WorldSpawn_VERSION_STRING} ${WorldSpawn_ABOUTMSG}")
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Language standard
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
if (CMAKE_VERSION VERSION_LESS "3.1")
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
include(CheckCXXCompilerFlag)
|
||||
check_cxx_compiler_flag(--std=c++${CMAKE_CXX_STANDARD} STD_CXX)
|
||||
if (STD_CXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++${CMAKE_CXX_STANDARD}")
|
||||
else ()
|
||||
message(SEND_ERROR "Requires C++${CMAKE_CXX_STANDARD} or better")
|
||||
endif ()
|
||||
else ()
|
||||
message(WARNING "Unrecognized compiler: ${CMAKE_CXX_COMPILER_ID}, make sure it supports C++${CMAKE_CXX_STANDARD}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Flags
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti")
|
||||
macro(addflags_c args)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${args}")
|
||||
endmacro()
|
||||
macro(addflags_cxx args)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${args}")
|
||||
endmacro()
|
||||
macro(addflags args)
|
||||
addflags_c("${args}")
|
||||
addflags_cxx("${args}")
|
||||
endmacro()
|
||||
addflags("-fno-strict-aliasing")
|
||||
if (NOT WIN32)
|
||||
addflags("-fvisibility=hidden")
|
||||
endif ()
|
||||
|
||||
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
||||
#disabled due to GTK bug addflags("-Werror")
|
||||
addflags("-pedantic-errors")
|
||||
endif ()
|
||||
|
||||
addflags("-Wall")
|
||||
addflags("-Wextra")
|
||||
addflags("-pedantic")
|
||||
|
||||
addflags_c("-Wno-deprecated-declarations") # vfs.c: g_strdown
|
||||
|
||||
addflags("-Wno-unused-function")
|
||||
addflags("-Wno-unused-variable")
|
||||
addflags("-Wno-unused-parameter")
|
||||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE 1)
|
||||
set(GTK_TARGET 2 CACHE STRING "GTK target")
|
||||
add_definitions(-DGTK_TARGET=${GTK_TARGET})
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Defs
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
add_definitions(-DWorldSpawn_VERSION="${WorldSpawn_VERSION}")
|
||||
add_definitions(-DWorldSpawn_MAJOR_VERSION="${WorldSpawn_VERSION_MAJOR}")
|
||||
add_definitions(-DWorldSpawn_MINOR_VERSION="${WorldSpawn_VERSION_MINOR}")
|
||||
add_definitions(-DWorldSpawn_PATCH_VERSION="${WorldSpawn_VERSION_PATCH}")
|
||||
|
||||
add_definitions(-DWorldSpawn_ABOUTMSG="${WorldSpawn_ABOUT}")
|
||||
|
||||
if (NOT CMAKE_BUILD_TYPE MATCHES Release)
|
||||
add_definitions(-D_DEBUG=1)
|
||||
endif ()
|
||||
|
||||
macro(disable_deprecated name gtk2only)
|
||||
add_definitions(-D${name}_DISABLE_SINGLE_INCLUDES)
|
||||
if ((${gtk2only} EQUAL 0) OR (GTK_TARGET EQUAL 2))
|
||||
add_definitions(-D${name}_DISABLE_DEPRECATED)
|
||||
endif ()
|
||||
endmacro()
|
||||
|
||||
disable_deprecated(ATK 0)
|
||||
disable_deprecated(G 0)
|
||||
disable_deprecated(GDK 0)
|
||||
disable_deprecated(GDK_PIXBUF 0)
|
||||
disable_deprecated(GTK 1)
|
||||
disable_deprecated(PANGO 0)
|
||||
|
||||
if (APPLE)
|
||||
option(XWINDOWS "Build against X11" ON)
|
||||
add_definitions(
|
||||
-DPOSIX=1
|
||||
)
|
||||
elseif (WIN32)
|
||||
add_definitions(
|
||||
-DWIN32=1
|
||||
-D_WIN32=1
|
||||
)
|
||||
else ()
|
||||
set(XWINDOWS ON)
|
||||
add_definitions(
|
||||
-DPOSIX=1
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (XWINDOWS)
|
||||
find_package(X11 REQUIRED)
|
||||
include_directories(${X11_INCLUDE_DIR})
|
||||
add_definitions(-DXWINDOWS=1)
|
||||
endif ()
|
||||
|
||||
include_directories("${PROJECT_SOURCE_DIR}/include")
|
||||
include_directories("${PROJECT_SOURCE_DIR}/libs")
|
||||
|
||||
# For our OpenBSD friends, because CMake isn't smart enough to figure that out?
|
||||
include_directories("/usr/local/include")
|
||||
link_directories("/usr/local/lib")
|
||||
include_directories("/usr/X11R6/include")
|
||||
link_directories("/usr/X11R6/lib")
|
||||
|
||||
if (WIN32 AND NOT CMAKE_CROSSCOMPILING)
|
||||
set(BUNDLE_LIBRARIES_DEFAULT ON)
|
||||
else ()
|
||||
set(BUNDLE_LIBRARIES_DEFAULT OFF)
|
||||
endif ()
|
||||
option(BUNDLE_LIBRARIES "Bundle libraries" ${BUNDLE_LIBRARIES_DEFAULT})
|
||||
|
||||
macro(copy_dlls target)
|
||||
if (BUNDLE_LIBRARIES)
|
||||
add_custom_command(TARGET ${target} POST_BUILD
|
||||
COMMAND bash
|
||||
ARGS -c "ldd '$<TARGET_FILE:${target}>' | grep -v /c/Windows | awk '{ print $1 }' | while read dll; do cp \"$(which $dll)\" '${PROJECT_BINARY_DIR}'; done"
|
||||
VERBATIM
|
||||
)
|
||||
endif ()
|
||||
endmacro()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Libraries
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
add_subdirectory(libs)
|
||||
add_subdirectory(include)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Plugins
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
if (BUILD_RADIANT)
|
||||
add_subdirectory(contrib)
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Modules
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
if (BUILD_RADIANT)
|
||||
add_subdirectory(plugins)
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Radiant
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
if (CMAKE_EXECUTABLE_SUFFIX)
|
||||
string(REGEX REPLACE "^[.]" "" WorldSpawn_EXECUTABLE ${CMAKE_EXECUTABLE_SUFFIX})
|
||||
else ()
|
||||
execute_process(
|
||||
COMMAND uname -m
|
||||
OUTPUT_VARIABLE WorldSpawn_EXECUTABLE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
endif ()
|
||||
|
||||
macro(radiant_tool name)
|
||||
add_executable(${name} ${ARGN})
|
||||
install(
|
||||
TARGETS ${name}
|
||||
RUNTIME DESTINATION .
|
||||
)
|
||||
if (NOT (CMAKE_EXECUTABLE_SUFFIX STREQUAL ".${WorldSpawn_EXECUTABLE}"))
|
||||
add_custom_command(TARGET ${name} POST_BUILD
|
||||
COMMAND ln -f -s "$<TARGET_FILE_NAME:${name}>" "${PROJECT_BINARY_DIR}/${name}.${WorldSpawn_EXECUTABLE}"
|
||||
VERBATIM
|
||||
)
|
||||
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
|
||||
${name}${CMAKE_EXECUTABLE_SUFFIX} ${CMAKE_INSTALL_PREFIX}/${name}.${WorldSpawn_EXECUTABLE})
|
||||
")
|
||||
endif ()
|
||||
endmacro()
|
||||
|
||||
if (BUILD_RADIANT)
|
||||
add_subdirectory(radiant _radiant)
|
||||
set_target_properties(worldspawn PROPERTIES
|
||||
COMPILE_DEFINITIONS WorldSpawn_EXECUTABLE="${WorldSpawn_EXECUTABLE}"
|
||||
)
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Tools
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
if (BUILD_VMAP)
|
||||
add_subdirectory(tools)
|
||||
endif ()
|
||||
|
||||
file(GLOB DATA_FILES "${PROJECT_SOURCE_DIR}/resources/*")
|
||||
|
||||
if (NOT (PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR))
|
||||
# Copy data files from sources to the build directory
|
||||
message(STATUS "Copying data files")
|
||||
file(COPY ${DATA_FILES} DESTINATION "${PROJECT_BINARY_DIR}")
|
||||
endif ()
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Install
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
install(
|
||||
FILES
|
||||
"${PROJECT_BINARY_DIR}/WorldSpawn_MAJOR"
|
||||
"${PROJECT_BINARY_DIR}/WorldSpawn_MINOR"
|
||||
"${PROJECT_BINARY_DIR}/WorldSpawn_PATCH"
|
||||
DESTINATION .
|
||||
)
|
||||
|
||||
install(
|
||||
DIRECTORY
|
||||
resources/
|
||||
DESTINATION .
|
||||
)
|
||||
|
||||
install(
|
||||
DIRECTORY
|
||||
DESTINATION .
|
||||
OPTIONAL
|
||||
)
|
||||
|
||||
include(cmake/scripts/package.cmake)
|
15
Makefile
Normal file
15
Makefile
Normal file
|
@ -0,0 +1,15 @@
|
|||
all:
|
||||
cp -Rv ./resources/ ./build/
|
||||
cd libs && $(MAKE)
|
||||
cd radiant && $(MAKE)
|
||||
cd plugins && $(MAKE)
|
||||
cd tools && $(MAKE)
|
||||
cd contrib && $(MAKE)
|
||||
|
||||
clean:
|
||||
-rm -rf ./build
|
||||
cd libs && $(MAKE) clean
|
||||
cd radiant && $(MAKE) clean
|
||||
cd plugins && $(MAKE) clean
|
||||
cd tools && $(MAKE) clean
|
||||
cd contrib && $(MAKE) clean
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
zip worldspawn_bin.zip -@ < build_contents.txt
|
|
@ -1,150 +0,0 @@
|
|||
WorldSpawn.app
|
||||
WorldSpawn.app/base
|
||||
WorldSpawn.app/base/textures
|
||||
WorldSpawn.app/base/textures/radiant
|
||||
WorldSpawn.app/base/textures/radiant/notex.png
|
||||
WorldSpawn.app/base/textures/radiant/shadernotex.png
|
||||
WorldSpawn.app/bitmaps
|
||||
WorldSpawn.app/bitmaps/black.png
|
||||
WorldSpawn.app/bitmaps/brush_flipx.png
|
||||
WorldSpawn.app/bitmaps/brush_flipy.png
|
||||
WorldSpawn.app/bitmaps/brush_flipz.png
|
||||
WorldSpawn.app/bitmaps/brush_rotatex.png
|
||||
WorldSpawn.app/bitmaps/brush_rotatey.png
|
||||
WorldSpawn.app/bitmaps/brush_rotatez.png
|
||||
WorldSpawn.app/bitmaps/cap_bevel.png
|
||||
WorldSpawn.app/bitmaps/cap_curve.png
|
||||
WorldSpawn.app/bitmaps/cap_cylinder.png
|
||||
WorldSpawn.app/bitmaps/cap_endcap.png
|
||||
WorldSpawn.app/bitmaps/cap_ibevel.png
|
||||
WorldSpawn.app/bitmaps/cap_iendcap.png
|
||||
WorldSpawn.app/bitmaps/console.png
|
||||
WorldSpawn.app/bitmaps/dontselectcurve.png
|
||||
WorldSpawn.app/bitmaps/dontselectmodel.png
|
||||
WorldSpawn.app/bitmaps/ellipsis.png
|
||||
WorldSpawn.app/bitmaps/entities.png
|
||||
WorldSpawn.app/bitmaps/file_open.png
|
||||
WorldSpawn.app/bitmaps/file_save.png
|
||||
WorldSpawn.app/bitmaps/icon.png
|
||||
WorldSpawn.app/bitmaps/lightinspector.png
|
||||
WorldSpawn.app/bitmaps/logo.png
|
||||
WorldSpawn.app/bitmaps/modify_edges.png
|
||||
WorldSpawn.app/bitmaps/modify_faces.png
|
||||
WorldSpawn.app/bitmaps/modify_vertices.png
|
||||
WorldSpawn.app/bitmaps/noFalloff.png
|
||||
WorldSpawn.app/bitmaps/notex.png
|
||||
WorldSpawn.app/bitmaps/patch_bend.png
|
||||
WorldSpawn.app/bitmaps/patch_drilldown.png
|
||||
WorldSpawn.app/bitmaps/patch_insdel.png
|
||||
WorldSpawn.app/bitmaps/patch_showboundingbox.png
|
||||
WorldSpawn.app/bitmaps/patch_weld.png
|
||||
WorldSpawn.app/bitmaps/patch_wireframe.png
|
||||
WorldSpawn.app/bitmaps/popup_selection.png
|
||||
WorldSpawn.app/bitmaps/redo.png
|
||||
WorldSpawn.app/bitmaps/refresh_models.png
|
||||
WorldSpawn.app/bitmaps/scalelockx.png
|
||||
WorldSpawn.app/bitmaps/scalelocky.png
|
||||
WorldSpawn.app/bitmaps/scalelockz.png
|
||||
WorldSpawn.app/bitmaps/selection_csgmerge.png
|
||||
WorldSpawn.app/bitmaps/selection_csgsubtract.png
|
||||
WorldSpawn.app/bitmaps/selection_makehollow.png
|
||||
WorldSpawn.app/bitmaps/selection_makeroom.png
|
||||
WorldSpawn.app/bitmaps/selection_selectcompletetall.png
|
||||
WorldSpawn.app/bitmaps/selection_selectinside.png
|
||||
WorldSpawn.app/bitmaps/selection_selectpartialtall.png
|
||||
WorldSpawn.app/bitmaps/selection_selecttouching.png
|
||||
WorldSpawn.app/bitmaps/select_mouseresize.png
|
||||
WorldSpawn.app/bitmaps/select_mouserotate.png
|
||||
WorldSpawn.app/bitmaps/select_mousescale.png
|
||||
WorldSpawn.app/bitmaps/select_mousetranslate.png
|
||||
WorldSpawn.app/bitmaps/shadernotex.png
|
||||
WorldSpawn.app/bitmaps/show_entities.png
|
||||
WorldSpawn.app/bitmaps/splash.png
|
||||
WorldSpawn.app/bitmaps/texture_browser.png
|
||||
WorldSpawn.app/bitmaps/texture_lock.png
|
||||
WorldSpawn.app/bitmaps/textures_popup.png
|
||||
WorldSpawn.app/bitmaps/undo.png
|
||||
WorldSpawn.app/bitmaps/view_cameratoggle.png
|
||||
WorldSpawn.app/bitmaps/view_cameraupdate.png
|
||||
WorldSpawn.app/bitmaps/view_change.png
|
||||
WorldSpawn.app/bitmaps/view_clipper.png
|
||||
WorldSpawn.app/bitmaps/view_cubicclipping.png
|
||||
WorldSpawn.app/bitmaps/view_entity.png
|
||||
WorldSpawn.app/bitmaps/white.png
|
||||
WorldSpawn.app/bitmaps/window1.png
|
||||
WorldSpawn.app/bitmaps/window2.png
|
||||
WorldSpawn.app/bitmaps/window3.png
|
||||
WorldSpawn.app/bitmaps/window4.png
|
||||
WorldSpawn.app/games
|
||||
WorldSpawn.app/games/tw.game
|
||||
WorldSpawn.app/gl
|
||||
WorldSpawn.app/gl/lighting_DBS_omni_fp.glp
|
||||
WorldSpawn.app/gl/lighting_DBS_omni_fp.glsl
|
||||
WorldSpawn.app/gl/lighting_DBS_omni_vp.glp
|
||||
WorldSpawn.app/gl/lighting_DBS_omni_vp.glsl
|
||||
WorldSpawn.app/gl/lighting_DBS_XY_Z_arbfp1.cg
|
||||
WorldSpawn.app/gl/lighting_DBS_XY_Z_arbvp1.cg
|
||||
WorldSpawn.app/gl/utils.cg
|
||||
WorldSpawn.app/gl/zfill_arbfp1.cg
|
||||
WorldSpawn.app/gl/zfill_arbvp1.cg
|
||||
WorldSpawn.app/gl/zfill_fp.glp
|
||||
WorldSpawn.app/gl/zfill_fp.glsl
|
||||
WorldSpawn.app/gl/zfill_vp.glp
|
||||
WorldSpawn.app/gl/zfill_vp.glsl
|
||||
WorldSpawn.app/global.xlink
|
||||
WorldSpawn.app/modules
|
||||
WorldSpawn.app/modules/libarchivezip.so
|
||||
WorldSpawn.app/modules/libentity.so
|
||||
WorldSpawn.app/modules/libimage.so
|
||||
WorldSpawn.app/modules/libiqmmodel.so
|
||||
WorldSpawn.app/modules/libmapq3.so
|
||||
WorldSpawn.app/modules/libmodel.so
|
||||
WorldSpawn.app/modules/libshaders.so
|
||||
WorldSpawn.app/modules/libvfspk3.so
|
||||
WorldSpawn.app/plugins
|
||||
WorldSpawn.app/plugins/bitmaps
|
||||
WorldSpawn.app/plugins/bitmaps/bobtoolz_caulk.png
|
||||
WorldSpawn.app/plugins/bitmaps/bobtoolz_cleanup.png
|
||||
WorldSpawn.app/plugins/bitmaps/bobtoolz_dropent.png
|
||||
WorldSpawn.app/plugins/bitmaps/bobtoolz_merge.png
|
||||
WorldSpawn.app/plugins/bitmaps/bobtoolz_poly.png
|
||||
WorldSpawn.app/plugins/bitmaps/bobtoolz_splitcol.png
|
||||
WorldSpawn.app/plugins/bitmaps/bobtoolz_split.png
|
||||
WorldSpawn.app/plugins/bitmaps/bobtoolz_splitrow.png
|
||||
WorldSpawn.app/plugins/bitmaps/bobtoolz_trainpathplot.png
|
||||
WorldSpawn.app/plugins/bitmaps/bobtoolz_treeplanter.png
|
||||
WorldSpawn.app/plugins/bitmaps/bobtoolz_turnedge.png
|
||||
WorldSpawn.app/plugins/bitmaps/ufoai_actorclip.png
|
||||
WorldSpawn.app/plugins/bitmaps/ufoai_level1.png
|
||||
WorldSpawn.app/plugins/bitmaps/ufoai_level2.png
|
||||
WorldSpawn.app/plugins/bitmaps/ufoai_level3.png
|
||||
WorldSpawn.app/plugins/bitmaps/ufoai_level4.png
|
||||
WorldSpawn.app/plugins/bitmaps/ufoai_level5.png
|
||||
WorldSpawn.app/plugins/bitmaps/ufoai_level6.png
|
||||
WorldSpawn.app/plugins/bitmaps/ufoai_level7.png
|
||||
WorldSpawn.app/plugins/bitmaps/ufoai_level8.png
|
||||
WorldSpawn.app/plugins/bitmaps/ufoai_nodraw.png
|
||||
WorldSpawn.app/plugins/bitmaps/ufoai_stepon.png
|
||||
WorldSpawn.app/plugins/bitmaps/ufoai_weaponclip.png
|
||||
WorldSpawn.app/plugins/bt
|
||||
WorldSpawn.app/plugins/bt/bt-el1.txt
|
||||
WorldSpawn.app/plugins/bt/bt-el2.txt
|
||||
WorldSpawn.app/plugins/bt/door-tex-trim.txt
|
||||
WorldSpawn.app/plugins/bt/door-tex.txt
|
||||
WorldSpawn.app/plugins/bt/tp_ent.txt
|
||||
WorldSpawn.app/plugins/libbobtoolz.so
|
||||
WorldSpawn.app/plugins/libbrushexport.so
|
||||
WorldSpawn.app/plugins/libprtview.so
|
||||
WorldSpawn.app/plugins/libshaderplug.so
|
||||
WorldSpawn.app/plugins/libsunplug.so
|
||||
WorldSpawn.app/tw.game
|
||||
WorldSpawn.app/tw.game/default_build_menu.xml
|
||||
WorldSpawn.app/tw.game/game.xlink
|
||||
WorldSpawn.app/tw.game/wastes
|
||||
WorldSpawn.app/tw.game/wastes/entities.def
|
||||
WorldSpawn.app/Resources
|
||||
WorldSpawn.app/Resources/Info-gnustep.plist
|
||||
WorldSpawn.app/Resources/icon.tiff
|
||||
WorldSpawn.app/vmap
|
||||
WorldSpawn.app/worldspawn
|
||||
WorldSpawn.app/WorldSpawn
|
|
@ -1,21 +0,0 @@
|
|||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
if (GLIB_FIND_REQUIRED)
|
||||
set(_pkgconfig_REQUIRED REQUIRED)
|
||||
endif ()
|
||||
pkg_check_modules(GLIB ${_pkgconfig_REQUIRED} glib-2.0)
|
||||
else ()
|
||||
find_path(GLIB_INCLUDE_DIRS glib.h)
|
||||
find_library(GLIB_LIBRARIES glib-2.0)
|
||||
if (GLIB_INCLUDE_DIRS AND GLIB_LIBRARIES)
|
||||
set(GLIB_FOUND 1)
|
||||
if (NOT GLIB_FIND_QUIETLY)
|
||||
message(STATUS "Found GLIB: ${GLIB_LIBRARIES}")
|
||||
endif ()
|
||||
elseif (GLIB_FIND_REQUIRED)
|
||||
message(SEND_ERROR "Could not find GLIB")
|
||||
elseif (NOT GLIB_FIND_QUIETLY)
|
||||
message(STATUS "Could not find GLIB")
|
||||
endif ()
|
||||
endif ()
|
||||
mark_as_advanced(GLIB_INCLUDE_DIRS GLIB_LIBRARIES)
|
|
@ -1,21 +0,0 @@
|
|||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
if (GTK2_FIND_REQUIRED)
|
||||
set(_pkgconfig_REQUIRED REQUIRED)
|
||||
endif ()
|
||||
pkg_check_modules(GTK2 ${_pkgconfig_REQUIRED} gtk+-2.0)
|
||||
else ()
|
||||
find_path(GTK2_INCLUDE_DIRS gtk.h)
|
||||
# find_library(GTK2_LIBRARIES)
|
||||
if (GTK2_INCLUDE_DIRS AND GTK2_LIBRARIES)
|
||||
set(GTK2_FOUND 1)
|
||||
if (NOT GTK2_FIND_QUIETLY)
|
||||
message(STATUS "Found GTK2: ${GTK2_LIBRARIES}")
|
||||
endif ()
|
||||
elseif (GTK2_FIND_REQUIRED)
|
||||
message(SEND_ERROR "Could not find GTK2")
|
||||
elseif (NOT GTK2_FIND_QUIETLY)
|
||||
message(STATUS "Could not find GTK2")
|
||||
endif ()
|
||||
endif ()
|
||||
mark_as_advanced(GTK2_INCLUDE_DIRS GTK2_LIBRARIES)
|
|
@ -1,21 +0,0 @@
|
|||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
if (GTK3_FIND_REQUIRED)
|
||||
set(_pkgconfig_REQUIRED REQUIRED)
|
||||
endif ()
|
||||
pkg_check_modules(GTK3 ${_pkgconfig_REQUIRED} gtk+-3.0)
|
||||
else ()
|
||||
find_path(GTK3_INCLUDE_DIRS gtk.h)
|
||||
# find_library(GTK3_LIBRARIES)
|
||||
if (GTK3_INCLUDE_DIRS AND GTK3_LIBRARIES)
|
||||
set(GTK3_FOUND 1)
|
||||
if (NOT GTK3_FIND_QUIETLY)
|
||||
message(STATUS "Found GTK3: ${GTK3_LIBRARIES}")
|
||||
endif ()
|
||||
elseif (GTK3_FIND_REQUIRED)
|
||||
message(SEND_ERROR "Could not find GTK3")
|
||||
elseif (NOT GTK3_FIND_QUIETLY)
|
||||
message(STATUS "Could not find GTK3")
|
||||
endif ()
|
||||
endif ()
|
||||
mark_as_advanced(GTK3_INCLUDE_DIRS GTK3_LIBRARIES)
|
|
@ -1,27 +0,0 @@
|
|||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
if (GtkGLExt_FIND_REQUIRED)
|
||||
set(_pkgconfig_REQUIRED REQUIRED)
|
||||
endif ()
|
||||
if (XWINDOWS)
|
||||
pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-x11-1.0)
|
||||
elseif (WIN32)
|
||||
pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-win32-1.0)
|
||||
else ()
|
||||
pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-quartz-1.0)
|
||||
endif ()
|
||||
else ()
|
||||
find_path(GtkGLExt_INCLUDE_DIRS gtkglwidget.h)
|
||||
# find_library(GtkGLExt_LIBRARIES)
|
||||
if (GtkGLExt_INCLUDE_DIRS AND GtkGLExt_LIBRARIES)
|
||||
set(GtkGLExt_FOUND 1)
|
||||
if (NOT GtkGLExt_FIND_QUIETLY)
|
||||
message(STATUS "Found GtkGLExt: ${GtkGLExt_LIBRARIES}")
|
||||
endif ()
|
||||
elseif (GtkGLExt_FIND_REQUIRED)
|
||||
message(SEND_ERROR "Could not find GtkGLExt")
|
||||
elseif (NOT GtkGLExt_FIND_QUIETLY)
|
||||
message(STATUS "Could not find GtkGLExt")
|
||||
endif ()
|
||||
endif ()
|
||||
mark_as_advanced(GtkGLExt_INCLUDE_DIRS GtkGLExt_LIBRARIES)
|
|
@ -1,21 +0,0 @@
|
|||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
if (Minizip_FIND_REQUIRED)
|
||||
set(_pkgconfig_REQUIRED REQUIRED)
|
||||
endif ()
|
||||
pkg_check_modules(Minizip ${_pkgconfig_REQUIRED} minizip)
|
||||
else ()
|
||||
find_path(Minizip_INCLUDE_DIRS unzip.h)
|
||||
# find_library(Minizip_LIBRARIES)
|
||||
if (Minizip_INCLUDE_DIRS AND Minizip_LIBRARIES)
|
||||
set(Minizip_FOUND 1)
|
||||
if (NOT Minizip_FIND_QUIETLY)
|
||||
message(STATUS "Found Minizip: ${Minizip_LIBRARIES}")
|
||||
endif ()
|
||||
elseif (Minizip_FIND_REQUIRED)
|
||||
message(SEND_ERROR "Could not find Minizip")
|
||||
elseif (NOT Minizip_FIND_QUIETLY)
|
||||
message(STATUS "Could not find Minizip")
|
||||
endif ()
|
||||
endif ()
|
||||
mark_as_advanced(Minizip_INCLUDE_DIRS Minizip_LIBRARIES)
|
|
@ -1,23 +0,0 @@
|
|||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
if (Pango_FIND_REQUIRED)
|
||||
set(_pkgconfig_REQUIRED REQUIRED)
|
||||
endif ()
|
||||
pkg_search_module(Pango ${_pkgconfig_REQUIRED} pango pangocairo)
|
||||
pkg_search_module(PangoFT2 ${_pkgconfig_REQUIRED} pangoft2)
|
||||
else ()
|
||||
# find_path(Pango_INCLUDE_DIRS)
|
||||
# find_library(Pango_LIBRARIES)
|
||||
if (Pango_INCLUDE_DIRS AND Pango_LIBRARIES)
|
||||
set(Pango_FOUND 1)
|
||||
if (NOT Pango_FIND_QUIETLY)
|
||||
message(STATUS "Found Pango: ${Pango_LIBRARIES}")
|
||||
endif ()
|
||||
elseif (Pango_FIND_REQUIRED)
|
||||
message(SEND_ERROR "Could not find Pango")
|
||||
elseif (NOT Pango_FIND_QUIETLY)
|
||||
message(STATUS "Could not find Pango")
|
||||
endif ()
|
||||
endif ()
|
||||
mark_as_advanced(Pango_INCLUDE_DIRS Pango_LIBRARIES)
|
||||
mark_as_advanced(PangoFT2_INCLUDE_DIRS PangoFT2_LIBRARIES)
|
|
@ -1,16 +0,0 @@
|
|||
set(CPACK_PACKAGE_NAME "WorldSpawn")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR "${WorldSpawn_VERSION_MAJOR}")
|
||||
set(CPACK_PACKAGE_VERSION_MINOR "${WorldSpawn_VERSION_MINOR}")
|
||||
set(CPACK_PACKAGE_VERSION_PATCH "${WorldSpawn_VERSION_PATCH}")
|
||||
|
||||
# binary: --target package
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
set(CPACK_STRIP_FILES 1)
|
||||
|
||||
# source: --target package_source
|
||||
set(CPACK_SOURCE_GENERATOR "ZIP")
|
||||
set(CPACK_SOURCE_IGNORE_FILES "/\\\\.git/;/build/;/install/")
|
||||
|
||||
# configure
|
||||
include(InstallRequiredSystemLibraries)
|
||||
include(CPack)
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if ! [ -x "$(command -v nproc)" ]; then
|
||||
BUILD_PROC=1
|
||||
else
|
||||
BUILD_PROC=$(nproc)
|
||||
fi
|
||||
|
||||
cmake -G "Unix Makefiles" -H. -Bbuild -DCMAKE_BUILD_TYPE=Debug && cmake --build build -- -j $BUILD_PROC
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if ! [ -x "$(command -v nproc)" ]; then
|
||||
BUILD_PROC=1
|
||||
else
|
||||
BUILD_PROC=$(nproc)
|
||||
fi
|
||||
|
||||
cmake -G "Unix Makefiles" -H. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build -- -j $BUILD_PROC
|
|
@ -1,16 +0,0 @@
|
|||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/plugins")
|
||||
|
||||
add_custom_target(plugins)
|
||||
macro(radiant_plugin name)
|
||||
message(STATUS "Found Plugin ${name}")
|
||||
add_library(${name} MODULE ${ARGN})
|
||||
add_dependencies(plugins ${name})
|
||||
copy_dlls(${name})
|
||||
install(
|
||||
TARGETS ${name}
|
||||
LIBRARY DESTINATION plugins
|
||||
)
|
||||
endmacro()
|
||||
|
||||
add_subdirectory(brushexport)
|
||||
add_subdirectory(prtview)
|
8
contrib/Makefile
Normal file
8
contrib/Makefile
Normal file
|
@ -0,0 +1,8 @@
|
|||
all:
|
||||
mkdir -p ../build/plugins
|
||||
cd brushexport && $(MAKE)
|
||||
cd prtview && $(MAKE)
|
||||
clean:
|
||||
-rm -rf ../build/plugins
|
||||
cd brushexport && $(MAKE) clean
|
||||
cd prtview && $(MAKE) clean
|
|
@ -1,10 +0,0 @@
|
|||
radiant_plugin(brushexport
|
||||
callbacks.cpp callbacks.h
|
||||
export.cpp export.h
|
||||
interface.cpp
|
||||
plugin.cpp plugin.h
|
||||
support.cpp support.h
|
||||
)
|
||||
|
||||
target_include_directories(brushexport PRIVATE uilib)
|
||||
target_link_libraries(brushexport PRIVATE uilib)
|
28
contrib/brushexport/Makefile
Normal file
28
contrib/brushexport/Makefile
Normal file
|
@ -0,0 +1,28 @@
|
|||
# WorldSpawn Plugin Makefile
|
||||
|
||||
GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS
|
||||
GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0)
|
||||
PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden
|
||||
PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared
|
||||
|
||||
DO_CXX=$(CXX) $(PLUGIN_CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
callbacks.o export.o interface.o plugin.o support.o
|
||||
|
||||
# binary target
|
||||
../../build/plugins/libbrushexport.so: $(WS_OBJS)
|
||||
$(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) ../../libs/libuilib.a ../../libs/libgtkutil.a
|
||||
|
||||
# object files
|
||||
callbacks.o: callbacks.cpp callbacks.h
|
||||
export.o: export.cpp export.h
|
||||
interface.o: interface.cpp
|
||||
plugin.o: plugin.cpp plugin.h
|
||||
support.o: support.cpp support.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../../build/plugins/libbrushexport.so
|
|
@ -1,7 +0,0 @@
|
|||
; brushexport.def : Declares the module parameters for the DLL.
|
||||
|
||||
LIBRARY "BRUSHEXPORT"
|
||||
|
||||
EXPORTS
|
||||
; Explicit exports can go here
|
||||
Radiant_RegisterModules @1
|
|
@ -128,7 +128,13 @@ public:
|
|||
typedef SingletonModule<BrushExportModule, BrushExportDependencies> SingletonBrushExportModule;
|
||||
SingletonBrushExportModule g_BrushExportModule;
|
||||
|
||||
extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server)
|
||||
extern "C" void
|
||||
#ifdef _WIN32
|
||||
__declspec(dllexport)
|
||||
#else
|
||||
__attribute__((visibility("default")))
|
||||
#endif
|
||||
Radiant_RegisterModules(ModuleServer &server)
|
||||
{
|
||||
initialiseModule(server);
|
||||
g_BrushExportModule.selfRegister();
|
||||
|
|
|
@ -66,7 +66,7 @@ void DoAboutDlg()
|
|||
char const *label_text = "Version 1.000\n\n"
|
||||
"Gtk port by Leonardo Zide\nleo@lokigames.com\n\n"
|
||||
"Written by Geoffrey DeWan\ngdewan@prairienet.org\n\n"
|
||||
"Built against WorldSpawn " WorldSpawn_VERSION "\n"
|
||||
"Built against WorldSpawn\n"
|
||||
__DATE__;
|
||||
auto label = ui::Label(label_text);
|
||||
label.show();
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
radiant_plugin(prtview
|
||||
AboutDialog.cpp AboutDialog.h
|
||||
ConfigDialog.cpp ConfigDialog.h
|
||||
LoadPortalFileDialog.cpp LoadPortalFileDialog.h
|
||||
portals.cpp portals.h
|
||||
prtview.cpp prtview.h
|
||||
)
|
||||
|
||||
target_include_directories(prtview PRIVATE uilib)
|
||||
target_link_libraries(prtview PRIVATE uilib)
|
||||
|
||||
target_include_directories(prtview PRIVATE profile)
|
||||
target_link_libraries(prtview PRIVATE profile)
|
28
contrib/prtview/Makefile
Normal file
28
contrib/prtview/Makefile
Normal file
|
@ -0,0 +1,28 @@
|
|||
# WorldSpawn Plugin Makefile
|
||||
|
||||
GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS
|
||||
GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0)
|
||||
PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden -DWorldSpawn_VERSION=1 -DWorldSpawn_MAJOR_VERSION=1 -DWorldSpawn_MINOR_VERSION=0 -DWorldSpawn_PATCH_VERSION=0
|
||||
PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared
|
||||
|
||||
DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
AboutDialog.o ConfigDialog.o LoadPortalFileDialog.o portals.o prtview.o
|
||||
|
||||
# binary target
|
||||
../../build/plugins/libprtview.so: $(WS_OBJS)
|
||||
$(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) ../../libs/libuilib.a ../../libs/libgtkutil.a ../../libs/libprofile.a
|
||||
|
||||
# object files
|
||||
AboutDialog.o: AboutDialog.cpp AboutDialog.h
|
||||
ConfigDialog.o: ConfigDialog.cpp ConfigDialog.h
|
||||
LoadPortalFileDialog.o: LoadPortalFileDialog.cpp LoadPortalFileDialog.h
|
||||
portals.o: portals.cpp portals.h
|
||||
prtview.o: prtview.cpp prtview.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../../build/plugins/libprtview.so
|
|
@ -1,7 +0,0 @@
|
|||
; PrtView.def : Declares the module parameters for the DLL.
|
||||
|
||||
LIBRARY "PrtView"
|
||||
|
||||
EXPORTS
|
||||
; Explicit exports can go here
|
||||
Radiant_RegisterModules @1
|
|
@ -315,7 +315,13 @@ typedef SingletonModule<PrtViewPluginModule, PrtViewPluginDependencies> Singleto
|
|||
SingletonPrtViewPluginModule g_PrtViewPluginModule;
|
||||
|
||||
|
||||
extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server)
|
||||
extern "C" void
|
||||
#ifdef _WIN32
|
||||
__declspec(dllexport)
|
||||
#else
|
||||
__attribute__((visibility("default")))
|
||||
#endif
|
||||
Radiant_RegisterModules(ModuleServer &server)
|
||||
{
|
||||
initialiseModule(server);
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
//
|
||||
// PRTVIEW.RC2 - resources Microsoft Visual C++ does not edit directly
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#error this file is not editable by Microsoft Visual C++
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Add manually edited resources here...
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
|
@ -1,48 +0,0 @@
|
|||
add_library(includes
|
||||
aboutmsg.h
|
||||
cullable.h
|
||||
dpkdeps.h
|
||||
editable.h
|
||||
iarchive.h
|
||||
ibrush.h
|
||||
icamera.h
|
||||
idatastream.h
|
||||
ieclass.h
|
||||
ientity.h
|
||||
ifilesystem.h
|
||||
ifiletypes.h
|
||||
ifilter.h
|
||||
igl.h
|
||||
iglrender.h
|
||||
igtkgl.h
|
||||
iimage.h
|
||||
imap.h
|
||||
imodel.h
|
||||
ipatch.h
|
||||
iplugin.h
|
||||
ireference.h
|
||||
irender.h
|
||||
iscenegraph.h
|
||||
iscriplib.h
|
||||
iselection.h
|
||||
ishaders.h
|
||||
itexdef.h
|
||||
itextstream.h
|
||||
itextures.h
|
||||
itoolbar.h
|
||||
iundo.h
|
||||
mapfile.h
|
||||
modelskin.h
|
||||
moduleobserver.h
|
||||
modulesystem.h
|
||||
nameable.h
|
||||
namespace.h
|
||||
preferencesystem.cpp preferencesystem.h
|
||||
qerplugin.h
|
||||
renderable.h
|
||||
selectable.h
|
||||
stream_version.h
|
||||
version.h
|
||||
warnings.h
|
||||
windowobserver.h
|
||||
)
|
|
@ -1,64 +0,0 @@
|
|||
add_subdirectory(cmdlib)
|
||||
add_subdirectory(container)
|
||||
add_subdirectory(ddslib)
|
||||
add_subdirectory(debugging)
|
||||
add_subdirectory(etclib)
|
||||
add_subdirectory(filematch)
|
||||
add_subdirectory(generic)
|
||||
if (BUILD_RADIANT)
|
||||
add_subdirectory(gtkutil)
|
||||
endif ()
|
||||
add_subdirectory(l_net)
|
||||
add_subdirectory(math)
|
||||
add_subdirectory(mathlib)
|
||||
add_subdirectory(memory)
|
||||
add_subdirectory(modulesystem)
|
||||
add_subdirectory(os)
|
||||
add_subdirectory(picomodel)
|
||||
add_subdirectory(profile)
|
||||
add_subdirectory(script)
|
||||
add_subdirectory(signal)
|
||||
add_subdirectory(splines)
|
||||
add_subdirectory(stream)
|
||||
add_subdirectory(string)
|
||||
add_subdirectory(uilib)
|
||||
add_subdirectory(xml)
|
||||
|
||||
add_library(libs
|
||||
_.cpp
|
||||
archivelib.h
|
||||
bytebool.h
|
||||
bytestreamutils.h
|
||||
character.h
|
||||
convert.h
|
||||
dragplanes.h
|
||||
eclasslib.h
|
||||
entitylib.h
|
||||
entityxml.h
|
||||
fs_filesystem.h
|
||||
fs_path.h
|
||||
globaldefs.h
|
||||
imagelib.h
|
||||
property.h
|
||||
instancelib.h
|
||||
maplib.h
|
||||
moduleobservers.h
|
||||
pivot.h
|
||||
render.h
|
||||
scenelib.h
|
||||
selectionlib.h
|
||||
shaderlib.h
|
||||
str.h
|
||||
stringio.h
|
||||
texturelib.h
|
||||
transformlib.h
|
||||
traverselib.h
|
||||
typesystem.h
|
||||
undolib.h
|
||||
uniquenames.h
|
||||
versionlib.h
|
||||
)
|
||||
|
||||
find_package(GLIB REQUIRED)
|
||||
target_include_directories(libs PRIVATE ${GLIB_INCLUDE_DIRS})
|
||||
target_link_libraries(libs PRIVATE ${GLIB_LIBRARIES})
|
52
libs/Makefile
Normal file
52
libs/Makefile
Normal file
|
@ -0,0 +1,52 @@
|
|||
|
||||
all:
|
||||
cd cmdlib && $(MAKE)
|
||||
cd container && $(MAKE)
|
||||
cd ddslib && $(MAKE)
|
||||
cd debugging && $(MAKE)
|
||||
cd etclib && $(MAKE)
|
||||
cd filematch && $(MAKE)
|
||||
cd generic && $(MAKE)
|
||||
cd gtkutil && $(MAKE)
|
||||
cd l_net && $(MAKE)
|
||||
cd math && $(MAKE)
|
||||
cd mathlib && $(MAKE)
|
||||
#cd md5lib && $(MAKE)
|
||||
cd memory && $(MAKE)
|
||||
cd modulesystem && $(MAKE)
|
||||
cd os && $(MAKE)
|
||||
cd picomodel && $(MAKE)
|
||||
cd profile && $(MAKE)
|
||||
cd script && $(MAKE)
|
||||
cd signal && $(MAKE)
|
||||
cd splines && $(MAKE)
|
||||
cd stream && $(MAKE)
|
||||
cd string && $(MAKE)
|
||||
cd uilib && $(MAKE)
|
||||
cd xml && $(MAKE)
|
||||
|
||||
clean:
|
||||
cd cmdlib && $(MAKE) clean
|
||||
cd container && $(MAKE) clean
|
||||
cd ddslib && $(MAKE) clean
|
||||
cd debugging && $(MAKE) clean
|
||||
cd etclib && $(MAKE) clean
|
||||
cd filematch && $(MAKE) clean
|
||||
cd generic && $(MAKE) clean
|
||||
cd gtkutil && $(MAKE) clean
|
||||
cd l_net && $(MAKE) clean
|
||||
cd math && $(MAKE) clean
|
||||
cd mathlib && $(MAKE) clean
|
||||
#cd md5lib && $(MAKE) clean
|
||||
cd memory && $(MAKE) clean
|
||||
cd modulesystem && $(MAKE) clean
|
||||
cd os && $(MAKE) clean
|
||||
cd picomodel && $(MAKE) clean
|
||||
cd profile && $(MAKE) clean
|
||||
cd script && $(MAKE) clean
|
||||
cd signal && $(MAKE) clean
|
||||
cd splines && $(MAKE) clean
|
||||
cd stream && $(MAKE) clean
|
||||
cd string && $(MAKE) clean
|
||||
cd uilib && $(MAKE) clean
|
||||
cd xml && $(MAKE) clean
|
|
@ -1,3 +0,0 @@
|
|||
add_library(cmdlib
|
||||
cmdlib.cpp ../cmdlib.h
|
||||
)
|
20
libs/cmdlib/Makefile
Normal file
20
libs/cmdlib/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
cmdlib.o
|
||||
|
||||
# binary target
|
||||
../libcmdlib.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
cmdlib.o: cmdlib.cpp
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libcmdlib.a
|
|
@ -1,8 +0,0 @@
|
|||
add_library(container
|
||||
array.cpp array.h
|
||||
cache.h
|
||||
container.h
|
||||
hashfunc.h
|
||||
hashtable.cpp hashtable.h
|
||||
stack.h
|
||||
)
|
21
libs/container/Makefile
Normal file
21
libs/container/Makefile
Normal file
|
@ -0,0 +1,21 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
array.o hashtable.o
|
||||
|
||||
# binary target
|
||||
../libcontainer.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
array.o: array.cpp array.h cache.h container.h hashfunc.h
|
||||
hashtable.o: hashtable.cpp hashtable.h stack.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libcontainer.a
|
|
@ -1,3 +0,0 @@
|
|||
add_library(ddslib
|
||||
ddslib.c ../ddslib.h
|
||||
)
|
20
libs/ddslib/Makefile
Normal file
20
libs/ddslib/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.c.o:
|
||||
$(DO_CC)
|
||||
|
||||
WS_OBJS = \
|
||||
ddslib.o
|
||||
|
||||
# binary target
|
||||
../libddslib.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
ddslib.o: ddslib.c
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libddslib.a
|
|
@ -1,3 +0,0 @@
|
|||
add_library(debugging
|
||||
debugging.cpp debugging.h
|
||||
)
|
20
libs/debugging/Makefile
Normal file
20
libs/debugging/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
debugging.o
|
||||
|
||||
# binary target
|
||||
../libdebugging.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
debugging.o: debugging.cpp debugging.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libdebugging.a
|
|
@ -1,3 +0,0 @@
|
|||
add_library(etclib
|
||||
../etclib.c ../etclib.h
|
||||
)
|
20
libs/etclib/Makefile
Normal file
20
libs/etclib/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.c.o:
|
||||
$(DO_CC)
|
||||
|
||||
WS_OBJS = \
|
||||
etclib.o
|
||||
|
||||
# binary target
|
||||
../libetclib.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
etclib.o: etclib.c etclib.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libetclib.a
|
114
libs/etclib/etclib.c
Normal file
114
libs/etclib/etclib.c
Normal file
|
@ -0,0 +1,114 @@
|
|||
// Copyright 2009 Google Inc.
|
||||
//
|
||||
// Based on the code from Android ETC1Util.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "etclib.h"
|
||||
|
||||
static void ETC_DecodeETC1SubBlock( byte *out, qboolean outRGBA, int r, int g, int b, int tableIndex, unsigned int low, qboolean second, qboolean flipped ){
|
||||
int baseX = 0, baseY = 0;
|
||||
const int modifierTable[] = {
|
||||
2, 8, -2, -8,
|
||||
5, 17, -5, -17,
|
||||
9, 29, -9, -29,
|
||||
13, 42, -13, -42,
|
||||
18, 60, -18, -60,
|
||||
24, 80, -24, -80,
|
||||
33, 106, -33, -106,
|
||||
47, 183, -47, -183
|
||||
};
|
||||
const int *table = modifierTable + tableIndex * 4;
|
||||
int i;
|
||||
|
||||
if ( second ) {
|
||||
if ( flipped ) {
|
||||
baseY = 2;
|
||||
}
|
||||
else {
|
||||
baseX = 2;
|
||||
}
|
||||
}
|
||||
|
||||
for ( i = 0; i < 8; i++ )
|
||||
{
|
||||
int x, y, k, delta;
|
||||
int qr, qg, qb;
|
||||
byte *q;
|
||||
|
||||
if ( flipped ) {
|
||||
x = baseX + ( i >> 1 );
|
||||
y = baseY + ( i & 1 );
|
||||
}
|
||||
else {
|
||||
x = baseX + ( i >> 2 );
|
||||
y = baseY + ( i & 3 );
|
||||
}
|
||||
k = y + ( x * 4 );
|
||||
delta = table[( ( low >> k ) & 1 ) | ( ( low >> ( k + 15 ) ) & 2 )];
|
||||
|
||||
qr = r + delta;
|
||||
qg = g + delta;
|
||||
qb = b + delta;
|
||||
if ( outRGBA ) {
|
||||
q = out + 4 * ( x + 4 * y );
|
||||
}
|
||||
else {
|
||||
q = out + 3 * ( x + 4 * y );
|
||||
}
|
||||
*( q++ ) = ( ( qr > 0 ) ? ( ( qr < 255 ) ? qr : 255 ) : 0 );
|
||||
*( q++ ) = ( ( qg > 0 ) ? ( ( qg < 255 ) ? qg : 255 ) : 0 );
|
||||
*( q++ ) = ( ( qb > 0 ) ? ( ( qb < 255 ) ? qb : 255 ) : 0 );
|
||||
if ( outRGBA ) {
|
||||
*( q++ ) = 255;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ETC_DecodeETC1Block( const byte* in, byte* out, qboolean outRGBA ){
|
||||
unsigned int high = ( in[0] << 24 ) | ( in[1] << 16 ) | ( in[2] << 8 ) | in[3];
|
||||
unsigned int low = ( in[4] << 24 ) | ( in[5] << 16 ) | ( in[6] << 8 ) | in[7];
|
||||
int r1, r2, g1, g2, b1, b2;
|
||||
qboolean flipped = ( ( high & 1 ) != 0 );
|
||||
|
||||
if ( high & 2 ) {
|
||||
int rBase, gBase, bBase;
|
||||
const int lookup[] = { 0, 1, 2, 3, -4, -3, -2, -1 };
|
||||
|
||||
rBase = ( high >> 27 ) & 31;
|
||||
r1 = ( rBase << 3 ) | ( rBase >> 2 );
|
||||
rBase = ( rBase + ( lookup[( high >> 24 ) & 7] ) ) & 31;
|
||||
r2 = ( rBase << 3 ) | ( rBase >> 2 );
|
||||
|
||||
gBase = ( high >> 19 ) & 31;
|
||||
g1 = ( gBase << 3 ) | ( gBase >> 2 );
|
||||
gBase = ( gBase + ( lookup[( high >> 16 ) & 7] ) ) & 31;
|
||||
g2 = ( gBase << 3 ) | ( gBase >> 2 );
|
||||
|
||||
bBase = ( high >> 11 ) & 31;
|
||||
b1 = ( bBase << 3 ) | ( bBase >> 2 );
|
||||
bBase = ( bBase + ( lookup[( high >> 8 ) & 7] ) ) & 31;
|
||||
b2 = ( bBase << 3 ) | ( bBase >> 2 );
|
||||
}
|
||||
else {
|
||||
r1 = ( ( high >> 24 ) & 0xf0 ) | ( ( high >> 28 ) & 0xf );
|
||||
r2 = ( ( high >> 20 ) & 0xf0 ) | ( ( high >> 24 ) & 0xf );
|
||||
g1 = ( ( high >> 16 ) & 0xf0 ) | ( ( high >> 20 ) & 0xf );
|
||||
g2 = ( ( high >> 12 ) & 0xf0 ) | ( ( high >> 16 ) & 0xf );
|
||||
b1 = ( ( high >> 8 ) & 0xf0 ) | ( ( high >> 12 ) & 0xf );
|
||||
b2 = ( ( high >> 4 ) & 0xf0 ) | ( ( high >> 8 ) & 0xf );
|
||||
}
|
||||
|
||||
ETC_DecodeETC1SubBlock( out, outRGBA, r1, g1, b1, ( high >> 5 ) & 7, low, qfalse, flipped );
|
||||
ETC_DecodeETC1SubBlock( out, outRGBA, r2, g2, b2, ( high >> 2 ) & 7, low, qtrue, flipped );
|
||||
}
|
33
libs/etclib/etclib.h
Normal file
33
libs/etclib/etclib.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
// Copyright 2009 Google Inc.
|
||||
//
|
||||
// Based on the code from Android ETC1Util.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef INCLUDED_ETCLIB_H
|
||||
#define INCLUDED_ETCLIB_H
|
||||
|
||||
#include "bytebool.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
void ETC_DecodeETC1Block( const byte* in, byte* out, qboolean outRGBA );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,3 +0,0 @@
|
|||
add_library(filematch
|
||||
../filematch.c ../filematch.h
|
||||
)
|
20
libs/filematch/Makefile
Normal file
20
libs/filematch/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.c.o:
|
||||
$(DO_CC)
|
||||
|
||||
WS_OBJS = \
|
||||
filematch.o
|
||||
|
||||
# binary target
|
||||
../libfilematch.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
filematch.o: filematch.c filematch.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libfilematch.a
|
74
libs/filematch/filematch.c
Normal file
74
libs/filematch/filematch.c
Normal file
|
@ -0,0 +1,74 @@
|
|||
#include <string.h>
|
||||
#include "filematch.h"
|
||||
|
||||
// LordHavoc: some portable directory listing code I wrote for lmp2pcx, now used in darkplaces to load id1/*.pak and such...
|
||||
|
||||
int matchpattern( const char *in, const char *pattern, int caseinsensitive ){
|
||||
return matchpattern_with_separator( in, pattern, caseinsensitive, "/\\:", 0 );
|
||||
}
|
||||
|
||||
// wildcard_least_one: if true * matches 1 or more characters
|
||||
// if false * matches 0 or more characters
|
||||
int matchpattern_with_separator( const char *in, const char *pattern, int caseinsensitive, const char *separators, int wildcard_least_one ){
|
||||
int c1, c2;
|
||||
while ( *pattern )
|
||||
{
|
||||
switch ( *pattern )
|
||||
{
|
||||
case 0:
|
||||
return 1; // end of pattern
|
||||
case '?': // match any single character
|
||||
if ( *in == 0 || strchr( separators, *in ) ) {
|
||||
return 0; // no match
|
||||
}
|
||||
in++;
|
||||
pattern++;
|
||||
break;
|
||||
case '*': // match anything until following string
|
||||
if ( wildcard_least_one ) {
|
||||
if ( *in == 0 || strchr( separators, *in ) ) {
|
||||
return 0; // no match
|
||||
}
|
||||
in++;
|
||||
}
|
||||
pattern++;
|
||||
while ( *in )
|
||||
{
|
||||
if ( strchr( separators, *in ) ) {
|
||||
break;
|
||||
}
|
||||
// see if pattern matches at this offset
|
||||
if ( matchpattern_with_separator( in, pattern, caseinsensitive, separators, wildcard_least_one ) ) {
|
||||
return 1;
|
||||
}
|
||||
// nope, advance to next offset
|
||||
in++;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if ( *in != *pattern ) {
|
||||
if ( !caseinsensitive ) {
|
||||
return 0; // no match
|
||||
}
|
||||
c1 = *in;
|
||||
if ( c1 >= 'A' && c1 <= 'Z' ) {
|
||||
c1 += 'a' - 'A';
|
||||
}
|
||||
c2 = *pattern;
|
||||
if ( c2 >= 'A' && c2 <= 'Z' ) {
|
||||
c2 += 'a' - 'A';
|
||||
}
|
||||
if ( c1 != c2 ) {
|
||||
return 0; // no match
|
||||
}
|
||||
}
|
||||
in++;
|
||||
pattern++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( *in ) {
|
||||
return 0; // reached end of pattern but not end of input
|
||||
}
|
||||
return 1; // success
|
||||
}
|
16
libs/filematch/filematch.h
Normal file
16
libs/filematch/filematch.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#if !defined( INCLUDED_FILEMATCH_H )
|
||||
#define INCLUDED_FILEMATCH_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
int matchpattern( const char *in, const char *pattern, int caseinsensitive );
|
||||
int matchpattern_with_separator( const char *in, const char *pattern, int caseinsensitive, const char *separators, int wildcard_least_one );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,13 +0,0 @@
|
|||
add_library(generic
|
||||
arrayrange.h
|
||||
bitfield.h
|
||||
callback.cpp callback.h
|
||||
constant.cpp constant.h
|
||||
enumeration.h
|
||||
functional.h
|
||||
object.cpp object.h
|
||||
reference.h
|
||||
referencecounted.h
|
||||
static.cpp static.h
|
||||
vector.h
|
||||
)
|
23
libs/generic/Makefile
Normal file
23
libs/generic/Makefile
Normal file
|
@ -0,0 +1,23 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
callback.o constant.o object.o static.o
|
||||
|
||||
# binary target
|
||||
../libgeneric.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
callback.o: callback.cpp callback.h
|
||||
constant.o: constant.cpp constant.h
|
||||
object.o: object.cpp object.h
|
||||
static.o: static.cpp static.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libgeneric.a
|
|
@ -1,37 +0,0 @@
|
|||
add_library(gtkutil
|
||||
accelerator.cpp accelerator.h
|
||||
button.cpp button.h
|
||||
clipboard.cpp clipboard.h
|
||||
closure.h
|
||||
container.h
|
||||
cursor.cpp cursor.h
|
||||
dialog.cpp dialog.h
|
||||
entry.cpp entry.h
|
||||
filechooser.cpp filechooser.h
|
||||
frame.cpp frame.h
|
||||
glfont.cpp glfont.h
|
||||
glwidget.cpp glwidget.h
|
||||
idledraw.h
|
||||
image.cpp image.h
|
||||
menu.cpp menu.h
|
||||
messagebox.cpp messagebox.h
|
||||
nonmodal.cpp nonmodal.h
|
||||
paned.cpp paned.h
|
||||
pointer.h
|
||||
toolbar.cpp toolbar.h
|
||||
widget.cpp widget.h
|
||||
window.cpp window.h
|
||||
xorrectangle.cpp xorrectangle.h
|
||||
)
|
||||
|
||||
target_include_directories(gtkutil PRIVATE uilib)
|
||||
target_link_libraries(gtkutil PRIVATE uilib)
|
||||
|
||||
target_include_directories(gtkutil PRIVATE ${GTK${GTK_TARGET}_INCLUDE_DIRS})
|
||||
target_link_libraries(gtkutil PRIVATE ${GTK${GTK_TARGET}_LIBRARIES})
|
||||
|
||||
if (GTK_TARGET EQUAL 2)
|
||||
find_package(GtkGLExt REQUIRED)
|
||||
target_include_directories(gtkutil PRIVATE ${GtkGLExt_INCLUDE_DIRS})
|
||||
target_link_libraries(gtkutil PRIVATE ${GtkGLExt_LIBRARIES})
|
||||
endif ()
|
57
libs/gtkutil/Makefile
Normal file
57
libs/gtkutil/Makefile
Normal file
|
@ -0,0 +1,57 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0)
|
||||
LIB_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../../include -I/usr/include/gtkglext-1.0 -I/usr/lib64/gtkglext-1.0/include/ -I../../libs -DGTK_TARGET=2 -DPOSIX -DXWINDOWS
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
accelerator.o \
|
||||
button.o \
|
||||
clipboard.o \
|
||||
cursor.o \
|
||||
dialog.o \
|
||||
entry.o \
|
||||
filechooser.o \
|
||||
frame.o \
|
||||
glfont.o \
|
||||
glwidget.o \
|
||||
image.o \
|
||||
menu.o \
|
||||
messagebox.o \
|
||||
nonmodal.o \
|
||||
paned.o \
|
||||
toolbar.o \
|
||||
widget.o \
|
||||
window.o \
|
||||
xorrectangle.o \
|
||||
|
||||
# binary target
|
||||
../libgtkutil.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
accelerator.o: accelerator.cpp accelerator.h
|
||||
button.o: button.cpp button.h
|
||||
clipboard.o: clipboard.cpp clipboard.h
|
||||
cursor.o: cursor.cpp cursor.h
|
||||
dialog.o: dialog.cpp dialog.h
|
||||
entry.o: entry.cpp entry.h
|
||||
filechooser.o: filechooser.cpp filechooser.h
|
||||
frame.o: frame.cpp frame.h
|
||||
glfont.o: glfont.cpp glfont.h
|
||||
glwidget.o: glwidget.cpp glwidget.h
|
||||
image.o: image.cpp image.h
|
||||
menu.o: menu.cpp menu.h
|
||||
messagebox.o: messagebox.cpp messagebox.h
|
||||
nonmodal.o: nonmodal.cpp nonmodal.h
|
||||
paned.o: paned.cpp paned.h
|
||||
toolbar.o: toolbar.cpp toolbar.h
|
||||
widget.o: widget.cpp widget.h
|
||||
window.o: window.cpp window.h
|
||||
xorrectangle.o: xorrectangle.cpp xorrectangle.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libgtkutil.a
|
|
@ -1,14 +0,0 @@
|
|||
set(L_NETLIST
|
||||
l_net.c l_net.h
|
||||
)
|
||||
if (WIN32)
|
||||
list(APPEND L_NETLIST l_net_wins.c l_net_wins.h)
|
||||
else ()
|
||||
list(APPEND L_NETLIST l_net_berkley.c)
|
||||
endif ()
|
||||
|
||||
add_library(l_net ${L_NETLIST})
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries(l_net PRIVATE ws2_32)
|
||||
endif ()
|
21
libs/l_net/Makefile
Normal file
21
libs/l_net/Makefile
Normal file
|
@ -0,0 +1,21 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.c.o:
|
||||
$(DO_CC)
|
||||
|
||||
WS_OBJS = \
|
||||
l_net.o l_net_berkley.o
|
||||
|
||||
# binary target
|
||||
../libl_net.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
l_net.o: l_net.c l_net.h
|
||||
l_net_berkley.o: l_net_berkley.c
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libl_net.a
|
|
@ -1,12 +0,0 @@
|
|||
add_library(math
|
||||
_.cpp
|
||||
aabb.h
|
||||
curve.h
|
||||
frustum.h
|
||||
line.h
|
||||
matrix.h
|
||||
pi.h
|
||||
plane.h
|
||||
quaternion.h
|
||||
vector.h
|
||||
)
|
20
libs/math/Makefile
Normal file
20
libs/math/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
_.o
|
||||
|
||||
# binary target
|
||||
../libmath.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
_.o: _.cpp aabb.h curve.h frustum.h line.h matrix.h pi.h plane.h quaternion.h vector.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libmath.a
|
|
@ -1,7 +0,0 @@
|
|||
add_library(mathlib
|
||||
bbox.c
|
||||
line.c
|
||||
m4x4.c
|
||||
mathlib.c ../mathlib.h
|
||||
ray.c
|
||||
)
|
24
libs/mathlib/Makefile
Normal file
24
libs/mathlib/Makefile
Normal file
|
@ -0,0 +1,24 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.c.o:
|
||||
$(DO_CC)
|
||||
|
||||
WS_OBJS = \
|
||||
bbox.o line.o m4x4.o mathlib.o ray.o
|
||||
|
||||
# binary target
|
||||
../libmathlib.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
bbox.o: bbox.c
|
||||
line.o: line.c
|
||||
m4x4.o: m4x4.c
|
||||
mathlib.o: mathlib.c ../mathlib.h
|
||||
ray.o: ray.c
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libmathlib.a
|
|
@ -1,3 +0,0 @@
|
|||
add_library(memory
|
||||
allocator.cpp allocator.h
|
||||
)
|
20
libs/memory/Makefile
Normal file
20
libs/memory/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
allocator.o
|
||||
|
||||
# binary target
|
||||
../libmemory.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
allocator.o: allocator.cpp allocator.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libmemory.a
|
|
@ -1,5 +0,0 @@
|
|||
add_library(modulesystem
|
||||
moduleregistry.h
|
||||
modulesmap.h
|
||||
singletonmodule.cpp singletonmodule.h
|
||||
)
|
20
libs/modulesystem/Makefile
Normal file
20
libs/modulesystem/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
singletonmodule.o
|
||||
|
||||
# binary target
|
||||
../libmodulesystem.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
singletonmodule.o: singletonmodule.cpp singletonmodule.h moduleregistry.h modulesmap.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libmodulesystem.a
|
|
@ -1,10 +0,0 @@
|
|||
add_library(os
|
||||
_.cpp
|
||||
dir.h
|
||||
file.h
|
||||
path.h
|
||||
)
|
||||
|
||||
find_package(GLIB REQUIRED)
|
||||
target_include_directories(os PRIVATE ${GLIB_INCLUDE_DIRS})
|
||||
target_link_libraries(os PRIVATE ${GLIB_LIBRARIES})
|
20
libs/os/Makefile
Normal file
20
libs/os/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
_.o
|
||||
|
||||
# binary target
|
||||
../libos.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
_.o: _.cpp dir.h file.h path.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libos.a
|
|
@ -1,27 +0,0 @@
|
|||
add_library(picomodel
|
||||
lwo/clip.c
|
||||
lwo/envelope.c
|
||||
lwo/list.c
|
||||
lwo/lwio.c
|
||||
lwo/lwo2.c lwo/lwo2.h
|
||||
lwo/lwob.c
|
||||
lwo/pntspols.c
|
||||
lwo/surface.c
|
||||
lwo/vecmath.c
|
||||
lwo/vmap.c
|
||||
|
||||
picointernal.c picointernal.h
|
||||
picomodel.c ../picomodel.h
|
||||
picomodules.c
|
||||
pm_3ds.c
|
||||
pm_ase.c
|
||||
pm_fm.c pm_fm.h
|
||||
pm_lwo.c
|
||||
pm_md2.c
|
||||
pm_md3.c
|
||||
pm_mdc.c
|
||||
pm_ms3d.c
|
||||
pm_obj.c
|
||||
pm_terrain.c
|
||||
pm_iqm.c
|
||||
)
|
67
libs/picomodel/Makefile
Normal file
67
libs/picomodel/Makefile
Normal file
|
@ -0,0 +1,67 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.c.o:
|
||||
$(DO_CC)
|
||||
|
||||
WS_OBJS = \
|
||||
clip.o \
|
||||
envelope.o \
|
||||
list.o \
|
||||
lwio.o \
|
||||
lwo2.o \
|
||||
lwob.o \
|
||||
pntspols.o \
|
||||
surface.o \
|
||||
vecmath.o \
|
||||
vmap.o \
|
||||
picointernal.o \
|
||||
picomodel.o \
|
||||
picomodules.o \
|
||||
pm_3ds.o \
|
||||
pm_ase.o \
|
||||
pm_fm.o \
|
||||
pm_lwo.o \
|
||||
pm_md2.o \
|
||||
pm_md3.o \
|
||||
pm_mdc.o \
|
||||
pm_ms3d.o \
|
||||
pm_obj.o \
|
||||
pm_terrain.o \
|
||||
pm_iqm.o
|
||||
|
||||
# binary target
|
||||
../libpicomodel.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
clip.o: clip.c
|
||||
envelope.o: envelope.c
|
||||
list.o: list.c
|
||||
lwio.o: lwio.c
|
||||
lwo2.o: lwo2.c lwo2.h
|
||||
lwob.o: lwob.c
|
||||
pntspols.o: pntspols.c
|
||||
surface.o: surface.c
|
||||
vecmath.o: vecmath.c
|
||||
vmap.o: vmap.c
|
||||
|
||||
picointernal.o: picointernal.c picointernal.h
|
||||
picomodel.o: picomodel.c ../picomodel.h
|
||||
picomodules.o: picomodules.c
|
||||
pm_3ds.o: pm_3ds.c
|
||||
pm_ase.o: pm_ase.c
|
||||
pm_fm.o: pm_fm.c pm_fm.h
|
||||
pm_lwo.o: pm_lwo.c
|
||||
pm_md2.o: pm_md2.c
|
||||
pm_md3.o: pm_md3.c
|
||||
pm_mdc.o: pm_mdc.c
|
||||
pm_ms3d.o: pm_ms3d.c
|
||||
pm_obj.o: pm_obj.c
|
||||
pm_terrain.o: pm_terrain.c
|
||||
pm_iqm.o: pm_iqm.c
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libpicomodel.a
|
|
@ -7,7 +7,7 @@
|
|||
Ernie Wright 17 Sep 00
|
||||
====================================================================== */
|
||||
|
||||
#include "../picointernal.h"
|
||||
#include "picointernal.h"
|
||||
#include "lwo2.h"
|
||||
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
Ernie Wright 16 Nov 00
|
||||
====================================================================== */
|
||||
|
||||
#include "../picointernal.h"
|
||||
#include "picointernal.h"
|
||||
#include "lwo2.h"
|
||||
|
||||
/*
|
|
@ -7,7 +7,7 @@
|
|||
Ernie Wright 17 Sep 00
|
||||
====================================================================== */
|
||||
|
||||
#include "../picointernal.h"
|
||||
#include "picointernal.h"
|
||||
#include "lwo2.h"
|
||||
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
Ernie Wright 17 Sep 00
|
||||
====================================================================== */
|
||||
|
||||
#include "../picointernal.h"
|
||||
#include "picointernal.h"
|
||||
#include "lwo2.h"
|
||||
#include <limits.h>
|
||||
#include "globaldefs.h"
|
|
@ -7,7 +7,7 @@
|
|||
Ernie Wright 17 Sep 00
|
||||
====================================================================== */
|
||||
|
||||
#include "../picointernal.h"
|
||||
#include "picointernal.h"
|
||||
#include "lwo2.h"
|
||||
#include "globaldefs.h"
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
Ernie Wright 17 Sep 00
|
||||
====================================================================== */
|
||||
|
||||
#include "../picointernal.h"
|
||||
#include "picointernal.h"
|
||||
#include "lwo2.h"
|
||||
#include "globaldefs.h"
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
/* dependencies */
|
||||
#include "picointernal.h"
|
||||
#include "lwo/lwo2.h"
|
||||
#include "lwo2.h"
|
||||
|
||||
/* uncomment when debugging this module */
|
||||
/*#define DEBUG_PM_LWO*/
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
Ernie Wright 17 Sep 00
|
||||
====================================================================== */
|
||||
|
||||
#include "../picointernal.h"
|
||||
#include "picointernal.h"
|
||||
#include "lwo2.h"
|
||||
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
Ernie Wright 17 Sep 00
|
||||
====================================================================== */
|
||||
|
||||
#include "../picointernal.h"
|
||||
#include "picointernal.h"
|
||||
#include "lwo2.h"
|
||||
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
Ernie Wright 17 Sep 00
|
||||
====================================================================== */
|
||||
|
||||
#include "../picointernal.h"
|
||||
#include "picointernal.h"
|
||||
#include "lwo2.h"
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
add_library(profile
|
||||
file.cpp file.h
|
||||
profile.cpp profile.h
|
||||
)
|
21
libs/profile/Makefile
Normal file
21
libs/profile/Makefile
Normal file
|
@ -0,0 +1,21 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
file.o profile.o
|
||||
|
||||
# binary target
|
||||
../libprofile.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
file.o: file.cpp file.h
|
||||
profile.o: profile.cpp profile.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libprofile.a
|
|
@ -1,5 +0,0 @@
|
|||
add_library(script
|
||||
_.cpp
|
||||
scripttokeniser.h
|
||||
scripttokenwriter.h
|
||||
)
|
20
libs/script/Makefile
Normal file
20
libs/script/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
_.o
|
||||
|
||||
# binary target
|
||||
../libscript.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
_.o: _.cpp scripttokeniser.h scripttokenwriter.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libscript.a
|
|
@ -1,5 +0,0 @@
|
|||
add_library(signal
|
||||
isignal.h
|
||||
signal.cpp signal.h
|
||||
signalfwd.h
|
||||
)
|
20
libs/signal/Makefile
Normal file
20
libs/signal/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
signal.o
|
||||
|
||||
# binary target
|
||||
../libsignal.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
signal.o: signal.cpp isignal.h signal.h signalfwd.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libsignal.a
|
|
@ -1,11 +0,0 @@
|
|||
add_library(splines
|
||||
math_angles.cpp math_angles.h
|
||||
math_matrix.cpp math_matrix.h
|
||||
math_quaternion.cpp math_quaternion.h
|
||||
math_vector.cpp math_vector.h
|
||||
q_parse.cpp
|
||||
q_shared.cpp q_shared.h
|
||||
splines.cpp splines.h
|
||||
util_list.h
|
||||
util_str.cpp util_str.h
|
||||
)
|
34
libs/splines/Makefile
Normal file
34
libs/splines/Makefile
Normal file
|
@ -0,0 +1,34 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
math_angles.o \
|
||||
math_matrix.o \
|
||||
math_quaternion.o \
|
||||
math_vector.o \
|
||||
q_parse.o \
|
||||
q_shared.o \
|
||||
splines.o \
|
||||
util_str.o
|
||||
|
||||
# binary target
|
||||
../libsplines.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
math_angles.o: math_angles.cpp math_angles.h
|
||||
math_matrix.o: math_matrix.cpp math_matrix.h
|
||||
math_quaternion.o: math_quaternion.cpp math_quaternion.h
|
||||
math_vector.o: math_vector.cpp math_vector.h
|
||||
q_parse.o: q_parse.cpp
|
||||
q_shared.o: q_shared.cpp q_shared.h
|
||||
splines.o: splines.cpp splines.h
|
||||
util_str.o: util_str.cpp util_str.h util_list.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libsplines.a
|
|
@ -1,8 +0,0 @@
|
|||
add_library(stream
|
||||
_.cpp
|
||||
filestream.h
|
||||
memstream.h
|
||||
stringstream.h
|
||||
textfilestream.h
|
||||
textstream.h
|
||||
)
|
20
libs/stream/Makefile
Normal file
20
libs/stream/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
_.o
|
||||
|
||||
# binary target
|
||||
../libstream.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
_.o: _.cpp filestream.h memstream.h stringstream.h textfilestream.h textstream.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libstream.a
|
|
@ -1,5 +0,0 @@
|
|||
add_library(string
|
||||
pooledstring.cpp pooledstring.h
|
||||
string.h
|
||||
stringfwd.h
|
||||
)
|
20
libs/string/Makefile
Normal file
20
libs/string/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
pooledstring.o
|
||||
|
||||
# binary target
|
||||
../libstring.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
pooledstring.o: pooledstring.cpp pooledstring.h string.h stringfwd.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libstring.a
|
|
@ -1,18 +0,0 @@
|
|||
add_library(uilib
|
||||
uilib.cpp
|
||||
)
|
||||
|
||||
find_package(GLIB REQUIRED)
|
||||
target_include_directories(uilib PUBLIC ${GLIB_INCLUDE_DIRS})
|
||||
target_link_libraries(uilib PUBLIC ${GLIB_LIBRARIES})
|
||||
|
||||
find_package(Pango REQUIRED)
|
||||
target_include_directories(uilib PUBLIC ${Pango_INCLUDE_DIRS} ${PangoFT2_INCLUDE_DIRS})
|
||||
target_link_libraries(uilib PUBLIC ${Pango_LIBRARIES} ${PangoFT2_LIBRARIES})
|
||||
|
||||
find_package(GTK${GTK_TARGET} REQUIRED)
|
||||
target_include_directories(uilib PUBLIC ${GTK${GTK_TARGET}_INCLUDE_DIRS})
|
||||
target_link_libraries(uilib PUBLIC ${GTK${GTK_TARGET}_LIBRARIES})
|
||||
|
||||
target_include_directories(uilib PUBLIC gtkutil)
|
||||
target_link_libraries(uilib PUBLIC gtkutil)
|
21
libs/uilib/Makefile
Normal file
21
libs/uilib/Makefile
Normal file
|
@ -0,0 +1,21 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0)
|
||||
LIB_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../../include -I../../libs -DGTK_TARGET=2 -DPOSIX -DXWINDOWS
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
uilib.o
|
||||
|
||||
# binary target
|
||||
../libuilib.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
uilib.o: uilib.cpp uilib.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libuilib.a
|
|
@ -1,15 +0,0 @@
|
|||
add_library(xmllib
|
||||
ixml.h
|
||||
xmlelement.h
|
||||
xmlparser.h
|
||||
xmltextags.cpp xmltextags.h
|
||||
xmlwriter.h
|
||||
)
|
||||
|
||||
find_package(GLIB REQUIRED)
|
||||
target_include_directories(xmllib PUBLIC ${GLIB_INCLUDE_DIRS})
|
||||
target_link_libraries(xmllib PUBLIC ${GLIB_LIBRARIES})
|
||||
|
||||
find_package(LibXml2 REQUIRED)
|
||||
target_include_directories(xmllib PUBLIC ${LIBXML2_INCLUDE_DIR})
|
||||
target_link_libraries(xmllib PUBLIC ${LIBXML2_LIBRARIES})
|
21
libs/xml/Makefile
Normal file
21
libs/xml/Makefile
Normal file
|
@ -0,0 +1,21 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0)
|
||||
LIB_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../../include -I../../libs -DGTK_TARGET=2 -DPOSIX -DXWINDOWS
|
||||
DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
xmltextags.o
|
||||
|
||||
# binary target
|
||||
../libxmllib.a: $(WS_OBJS)
|
||||
ar rcs $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
xmltextags.o: ixml.h xmlelement.h xmlparser.h xmltextags.cpp xmltextags.h xmlwriter.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../libxmllib.a
|
|
@ -1,22 +0,0 @@
|
|||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/modules")
|
||||
|
||||
add_custom_target(modules)
|
||||
macro(radiant_plugin name)
|
||||
message(STATUS "Found Module ${name}")
|
||||
add_library(${name} MODULE ${ARGN})
|
||||
add_dependencies(modules ${name})
|
||||
copy_dlls(${name})
|
||||
install(
|
||||
TARGETS ${name}
|
||||
LIBRARY DESTINATION modules
|
||||
)
|
||||
endmacro()
|
||||
|
||||
add_subdirectory(archivezip)
|
||||
add_subdirectory(entity)
|
||||
add_subdirectory(image)
|
||||
add_subdirectory(mapq3)
|
||||
add_subdirectory(iqmmodel)
|
||||
add_subdirectory(model)
|
||||
add_subdirectory(shaders)
|
||||
add_subdirectory(vfspk3)
|
20
plugins/Makefile
Normal file
20
plugins/Makefile
Normal file
|
@ -0,0 +1,20 @@
|
|||
all:
|
||||
mkdir -p ../build/plugins
|
||||
cd archivezip && $(MAKE)
|
||||
cd entity && $(MAKE)
|
||||
cd image && $(MAKE)
|
||||
cd iqmmodel && $(MAKE)
|
||||
cd mapq3 && $(MAKE)
|
||||
cd model && $(MAKE)
|
||||
cd shaders && $(MAKE)
|
||||
cd vfspk3 && $(MAKE)
|
||||
clean:
|
||||
-rm -rf ../build/plugins
|
||||
cd archivezip && $(MAKE) clean
|
||||
cd entity && $(MAKE) clean
|
||||
cd image && $(MAKE) clean
|
||||
cd iqmmodel && $(MAKE) clean
|
||||
cd mapq3 && $(MAKE) clean
|
||||
cd model && $(MAKE) clean
|
||||
cd shaders && $(MAKE) clean
|
||||
cd vfspk3 && $(MAKE) clean
|
|
@ -1,10 +0,0 @@
|
|||
radiant_plugin(archivezip
|
||||
archive.cpp archive.h
|
||||
pkzip.h
|
||||
plugin.cpp
|
||||
zlibstream.h
|
||||
)
|
||||
|
||||
find_package(ZLIB REQUIRED)
|
||||
target_include_directories(archivezip PRIVATE ${ZLIB_INCLUDE_DIRS})
|
||||
target_link_libraries(archivezip PRIVATE ${ZLIB_LIBRARIES})
|
23
plugins/archivezip/Makefile
Normal file
23
plugins/archivezip/Makefile
Normal file
|
@ -0,0 +1,23 @@
|
|||
# WorldSpawn Plugin Makefile
|
||||
|
||||
PLUGIN_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden
|
||||
PLUGIN_LDFLAGS=$(LDFLAGS) -shared
|
||||
|
||||
DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
archive.o plugin.o
|
||||
|
||||
# binary target
|
||||
../../build/plugins/libarchivezip.so: $(WS_OBJS)
|
||||
$(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
archive.o: archive.cpp archive.h
|
||||
plugin.o: plugin.cpp zlibstream.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../../build/plugins/libarchivezip.so
|
|
@ -1,7 +0,0 @@
|
|||
; archivezip.def : Declares the module parameters for the DLL.
|
||||
|
||||
LIBRARY "ARCHIVEZIP"
|
||||
|
||||
EXPORTS
|
||||
; Explicit exports can go here
|
||||
Radiant_RegisterModules @1
|
|
@ -96,7 +96,13 @@ typedef SingletonModule<ArchiveDPKAPI> ArchiveDPKModule;
|
|||
ArchiveDPKModule g_ArchiveDPKModule;
|
||||
|
||||
|
||||
extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server)
|
||||
extern "C" void
|
||||
#ifdef _WIN32
|
||||
__declspec(dllexport)
|
||||
#else
|
||||
__attribute__((visibility("default")))
|
||||
#endif
|
||||
Radiant_RegisterModules(ModuleServer &server)
|
||||
{
|
||||
initialiseModule(server);
|
||||
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
# Common configuration options for all plugins
|
||||
|
||||
CC=gcc
|
||||
CXX=g++
|
||||
CFLAGS+=`gtk-config --cflags` -Wall -g -I../../include
|
||||
CPPFLAGS+=`gtk-config --cflags` -Wall -g -I../../include
|
||||
LDFLAGS+=`gtk-config --libs` -shared
|
||||
OUTDIR=$(RADIANT_DATA)plugins
|
||||
OBJS := $(patsubst %.cpp,%.o,$(filter %.cpp,$(SRC)))
|
||||
OBJS += $(patsubst %.c,%.o,$(filter %.c,$(SRC)))
|
||||
|
||||
all: $(OUTPUT)
|
||||
|
||||
$(OUTPUT): $(OBJS)
|
||||
$(CXX) -o $(OUTPUT) $(OBJS) $(LDFLAGS)
|
||||
@if [ -d $(OUTDIR) ]; then cp $(OUTPUT) $(OUTDIR); fi
|
||||
|
||||
## Other targets
|
||||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
rm -f *.o *.d $(OUTPUT) core
|
||||
|
||||
## Dependencies
|
||||
-include $(OBJS:.o=.d)
|
||||
|
||||
%.d: %.cpp
|
||||
@echo -n "$(@) " > $@
|
||||
@if { !(eval $(CXX) -MM $(CPPFLAGS) -w $<) >> $@; }; then \
|
||||
rm -f $@; exit 1; \
|
||||
fi
|
||||
@[ -s $@ ] || rm -f $@
|
|
@ -1,29 +0,0 @@
|
|||
radiant_plugin(entity
|
||||
angle.h
|
||||
angles.h
|
||||
colour.h
|
||||
curve.h
|
||||
eclassmodel.cpp eclassmodel.h
|
||||
entity.cpp entity.h
|
||||
filters.cpp filters.h
|
||||
generic.cpp generic.h
|
||||
group.cpp group.h
|
||||
keyobservers.h
|
||||
light.cpp light.h
|
||||
miscmodel.cpp miscmodel.h
|
||||
prop_dynamic.cpp prop_dynamic.h
|
||||
model.h
|
||||
modelskinkey.h
|
||||
namedentity.h
|
||||
namekeys.h
|
||||
origin.h
|
||||
plugin.cpp
|
||||
rotation.h
|
||||
scale.h
|
||||
skincache.cpp skincache.h
|
||||
targetable.cpp targetable.h
|
||||
)
|
||||
|
||||
target_include_directories(entity
|
||||
PRIVATE $<TARGET_PROPERTY:uilib,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
44
plugins/entity/Makefile
Normal file
44
plugins/entity/Makefile
Normal file
|
@ -0,0 +1,44 @@
|
|||
# WorldSpawn Makefile
|
||||
|
||||
GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS
|
||||
GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0)
|
||||
PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden
|
||||
PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared
|
||||
|
||||
DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $<
|
||||
|
||||
.cpp.o:
|
||||
$(DO_CXX)
|
||||
|
||||
WS_OBJS = \
|
||||
eclassmodel.o \
|
||||
entity.o \
|
||||
filters.o \
|
||||
generic.o \
|
||||
group.o \
|
||||
light.o \
|
||||
miscmodel.o \
|
||||
prop_dynamic.o \
|
||||
plugin.o \
|
||||
skincache.o \
|
||||
targetable.o
|
||||
|
||||
# binary target
|
||||
../../build/plugins/libentity.so: $(WS_OBJS)
|
||||
$(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS)
|
||||
|
||||
# object files
|
||||
eclassmodel.o: eclassmodel.cpp eclassmodel.h
|
||||
entity.o: entity.cpp entity.h
|
||||
filters.o: filters.cpp filters.h
|
||||
generic.o: generic.cpp generic.h
|
||||
group.o: group.cpp group.h
|
||||
light.o: light.cpp light.h
|
||||
miscmodel.o: miscmodel.cpp miscmodel.h
|
||||
prop_dynamic.o: prop_dynamic.cpp prop_dynamic.h
|
||||
plugin.o: plugin.cpp
|
||||
skincache.o: skincache.cpp skincache.h
|
||||
targetable.o: targetable.cpp targetable.h
|
||||
|
||||
clean:
|
||||
-rm -f *.o ../../build/plugins/libentity.so
|
|
@ -1,7 +0,0 @@
|
|||
; entityq3.def : Declares the module parameters for the DLL.
|
||||
|
||||
LIBRARY "ENTITYQ3"
|
||||
|
||||
EXPORTS
|
||||
; Explicit exports can go here
|
||||
Radiant_RegisterModules @1
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue