From 9a283fb5867ff00478eaf329529f4386a069df4b Mon Sep 17 00:00:00 2001 From: Mattia Basaglia Date: Tue, 28 Jul 2015 22:07:25 +0200 Subject: [PATCH] Compile q3data --- tools/quake3/CMakeLists.txt | 97 +++++++++++++++++++++++++------------ 1 file changed, 66 insertions(+), 31 deletions(-) diff --git a/tools/quake3/CMakeLists.txt b/tools/quake3/CMakeLists.txt index 8fca13d7..7f7539e3 100644 --- a/tools/quake3/CMakeLists.txt +++ b/tools/quake3/CMakeLists.txt @@ -6,6 +6,21 @@ include_directories(common) include_directories("${CMAKE_SOURCE_DIR}/libs") include_directories("${CMAKE_SOURCE_DIR}/include") +find_package(GLIB REQUIRED) +include_directories(${GLIB_INCLUDE_DIRS}) + +find_package(JPEG REQUIRED) +include_directories(${JPEG_INCLUDE_DIR}) + +find_package(PNG REQUIRED) +include_directories(${PNG_INCLUDE_DIR}) + +find_package(LibXml2 REQUIRED) +include_directories(${LIBXML2_INCLUDE_DIR}) + +find_package(ZLIB REQUIRED) +include_directories(${ZLIB_INCLUDE_DIRS}) + add_executable(q3map2 common/cmdlib.c common/cmdlib.h @@ -93,20 +108,6 @@ add_executable(q3map2 q3map2/visflow.c q3map2/writebsp.c ) -find_package(GLIB REQUIRED) -include_directories(${GLIB_INCLUDE_DIRS}) - -find_package(JPEG REQUIRED) -include_directories(${JPEG_INCLUDE_DIR}) - -find_package(PNG REQUIRED) -include_directories(${PNG_INCLUDE_DIR}) - -find_package(LibXml2 REQUIRED) -include_directories(${LIBXML2_INCLUDE_DIR}) - -find_package(ZLIB REQUIRED) -include_directories(${ZLIB_INCLUDE_DIRS}) target_link_libraries(q3map2 ${GLIB_LIBRARIES} @@ -122,24 +123,58 @@ target_link_libraries(q3map2 picomodel ) +add_executable(q3data + common/aselib.c + common/aselib.h + common/bspfile.c + common/bspfile.h + common/cmdlib.c + common/cmdlib.h + common/imagelib.c + common/imagelib.h + common/inout.c + common/inout.h + common/md4.c + common/md4.h + common/scriplib.c + common/scriplib.h + common/trilib.c + common/trilib.h + common/unzip.c + common/unzip.h + common/vfs.c + common/vfs.h + q3data/3dslib.c + q3data/3dslib.h + q3data/compress.c + q3data/images.c + q3data/md3lib.c + q3data/md3lib.h + q3data/models.c +# q3data/oldstuff.c + q3data/p3dlib.c + q3data/p3dlib.h + q3data/polyset.c + q3data/q3data.c + q3data/q3data.h + q3data/stripper.c + q3data/video.c +) + +target_link_libraries(q3data + ${GLIB_LIBRARIES} + ${LIBXML2_LIBRARIES} + ${ZLIB_LIBRARIES} + filematch + etclib + l_net + mathlib +) + if (UNIX) target_link_libraries(q3map2 pthread m) + target_link_libraries(q3data m) endif() -#$(if $(findstring $(OS),Win32),icons/q3map2.o,) ? - -# q3data/3dslib.c -# q3data/3dslib.h -# q3data/compress.c -# q3data/images.c -# q3data/md3lib.c -# q3data/md3lib.h -# q3data/models.c -# q3data/oldstuff.c -# q3data/p3dlib.c -# q3data/p3dlib.h -# q3data/polyset.c -# q3data/q3data.c -# q3data/q3data.h -# q3data/stripper.c -# q3data/video.c +#$(if $(findstring $(OS),Win32),icons/q3map2.o,) ? +# $(if $(findstring $(OS),Win32),icons/q3data.o,) ? -- 2.39.2