Commit f715e5f6 authored by Thomas Debesse's avatar Thomas Debesse

make crunch a submodule

parent 1483f2b8
[submodule "libs/crunch"]
path = libs/crunch
url = https://github.com/DaemonEngine/crunch.git
......@@ -13,7 +13,7 @@ http://git-scm.org
To get a copy of the source using the commandline git client:
```
git clone https://gitlab.com/xonotic/netradiant.git
git clone --recursive https://gitlab.com/xonotic/netradiant.git
cd netradiant
```
......@@ -54,6 +54,17 @@ brew install Caskroom/cask/xquartz
brew link --force gettext
```
# Submodules
* Crunch
If you forgot to add `--recursive` option at `git clone` time, fetch it this way:
```
git submodule update --init --recursive
```
# Compiling
This project uses the usual CMake workflow:
......@@ -86,3 +97,7 @@ targets:
* `quake3` Compiles all the Quake3 tools
- `q3map2` Quake3 map compiler
- `q3data`
## Note about Crunch
The crnlib used to decode `.crn` files is the one from [Dæmon](http://github.com/DaemonEngine/Daemon) which is just the one by [Unity](https://github.com/Unity-Technologies/crunch/tree/unity) made cross-platform. Since Unity brokes compatibility with [BinomialLLC's legacy tree](https://github.com/BinomialLLC/crunch) it's required to use either crunch from Dæmon or the one from Unity to compress textures that have to be read by radiant or q3map2.
add_subdirectory(cmdlib)
add_subdirectory(container)
add_subdirectory(crunch)
add_subdirectory(crnrgba)
add_subdirectory(ddslib)
add_subdirectory(debugging)
add_subdirectory(etclib)
......
add_library(crnrgba
crn_rgba.h
crn_rgba.cpp
../crunch/inc/crn_decomp.h
../crunch/inc/crnlib.h
)
set_target_properties(crnrgba PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(crnrgba PRIVATE ddslib)
target_compile_options(crnrgba PRIVATE -fexceptions)
......@@ -28,7 +28,7 @@
#include "ddslib.h"
#include "crn_decomp.h"
#include "../crunch/inc/crn_decomp.h"
int LittleLong(int l) {
#if GDEF_ARCH_ENDIAN_BIG
......
Subproject commit 85bab3d798a54abe32a22d5275e625ec06df6917
add_library(crnlib
crn_decomp.h
crnlib.h
crn_rgba.h
crn_rgba.cpp
)
set_target_properties(crnlib PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(crnlib PRIVATE ddslib)
target_compile_options(crnlib PRIVATE -fexceptions)
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
......@@ -10,6 +10,6 @@ radiant_plugin(image
)
find_package(JPEG REQUIRED)
target_include_directories(image PRIVATE ${JPEG_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/libs/crunch)
target_link_libraries(image PRIVATE ddslib etclib crnlib ${JPEG_LIBRARIES})
target_include_directories(image PRIVATE ${JPEG_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/libs/crnrgba)
target_link_libraries(image PRIVATE crnrgba ddslib etclib ${JPEG_LIBRARIES})
target_compile_options(image PRIVATE -fexceptions)
......@@ -31,7 +31,7 @@ include_directories(${ZLIB_INCLUDE_DIRS})
find_package(Minizip REQUIRED)
include_directories(${Minizip_INCLUDE_DIRS})
include_directories(${CMAKE_SOURCE_DIR}/libs/crunch)
include_directories(${CMAKE_SOURCE_DIR}/libs/crnrgba)
set(q3map2_games
q3map2/game_darkplaces.h
......@@ -128,8 +128,8 @@ target_link_libraries(q3map2
${LIBXML2_LIBRARIES}
${Minizip_LIBRARIES}
${ZLIB_LIBRARIES}
crnrgba
ddslib
crnlib
etclib
filematch
l_net
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment