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
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}
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,) ?