summaryrefslogtreecommitdiff
path: root/meshmc/libraries/classparser/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'meshmc/libraries/classparser/CMakeLists.txt')
-rw-r--r--meshmc/libraries/classparser/CMakeLists.txt41
1 files changed, 41 insertions, 0 deletions
diff --git a/meshmc/libraries/classparser/CMakeLists.txt b/meshmc/libraries/classparser/CMakeLists.txt
new file mode 100644
index 0000000000..f4776902cf
--- /dev/null
+++ b/meshmc/libraries/classparser/CMakeLists.txt
@@ -0,0 +1,41 @@
+project(classparser)
+
+set(CMAKE_AUTOMOC ON)
+
+######## Check endianness ########
+include(TestBigEndian)
+test_big_endian(BIGENDIAN)
+if(${BIGENDIAN})
+ add_definitions(-DMULTIMC_BIG_ENDIAN)
+endif(${BIGENDIAN})
+
+# Find Qt
+find_package(Qt6Core REQUIRED)
+
+# Include Qt headers.
+include_directories(${Qt6Base_INCLUDE_DIRS})
+
+set(CLASSPARSER_HEADERS
+# Public headers
+include/classparser_config.h
+include/classparser.h
+
+# Private headers
+src/annotations.h
+src/classfile.h
+src/constants.h
+src/errors.h
+src/javaendian.h
+src/membuffer.h
+)
+
+set(CLASSPARSER_SOURCES
+src/classparser.cpp
+src/annotations.cpp
+)
+
+add_definitions(-DCLASSPARSER_LIBRARY)
+
+add_library(MeshMC_classparser STATIC ${CLASSPARSER_SOURCES} ${CLASSPARSER_HEADERS})
+target_include_directories(MeshMC_classparser PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
+target_link_libraries(MeshMC_classparser PRIVATE LibArchive::LibArchive Qt6::Core)