summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..45f99a6
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,30 @@
+cmake_minimum_required(VERSION 3.22)
+
+project(partition_tools VERSION 1.0.0 DESCRIPTION "partition_tools")
+
+add_subdirectory("lib/base")
+add_subdirectory("lib/boringssl")
+add_subdirectory("lib/ext4_utils")
+add_subdirectory("lib/fmtlib")
+add_subdirectory("lib/libcrypto_utils")
+add_subdirectory("lib/libjsonpb")
+add_subdirectory("lib/liblog")
+add_subdirectory("lib/liblp")
+add_subdirectory("lib/libsparse")
+add_subdirectory("lib/protobuf")
+add_subdirectory("lib/zlib")
+
+add_executable(lpmake)
+
+target_sources(lpmake PRIVATE "partition_tools/lpmake.cc")
+target_include_directories(lpmake PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/lib/include)
+target_compile_definitions(lpmake PRIVATE -D_FILE_OFFSET_BITS=64)
+target_compile_options(lpmake PRIVATE -std=c++17)
+
+target_link_libraries(lpmake PRIVATE liblp libsparse ext4_utils zlib base fmtlib liblog libcrypto_utils boringssl pthread)
+
+#${CPP} -std=c++17 -I../lib/include ${CFLAGS} -D_FILE_OFFSET_BITS=64 -o "../bin/$ARCH/lpmake" lpmake.cc ../lib/lib/liblp.a ../lib/lib/libsparse.a ../lib/lib/libext4_utils.a ../lib/lib/libz.a ../lib/lib/libbase.a ../lib/lib/fmtlib.a ../lib/lib/liblog.a ../lib/lib/libcrypto_utils.a ../lib/lib/libcrypto.a -lpthread ${LDFLAGS}
+#${CPP} -std=c++17 -I../lib/include ${CFLAGS} -D_FILE_OFFSET_BITS=64 -o "../bin/$ARCH/lpadd" lpadd.cc ../lib/lib/liblp.a ../lib/lib/libsparse.a ../lib/lib/libext4_utils.a ../lib/lib/libz.a ../lib/lib/libbase.a ../lib/lib/fmtlib.a ../lib/lib/liblog.a ../lib/lib/libcrypto_utils.a ../lib/lib/libcrypto.a -lpthread ${LDFLAGS}
+#${CPP} -std=c++17 -I../lib/include ${CFLAGS} -D_FILE_OFFSET_BITS=64 -o "../bin/$ARCH/lpflash" lpflash.cc ../lib/lib/liblp.a ../lib/lib/libsparse.a ../lib/lib/libext4_utils.a ../lib/lib/libz.a ../lib/lib/libbase.a ../lib/lib/fmtlib.a ../lib/lib/liblog.a ../lib/lib/libcrypto_utils.a ../lib/lib/libcrypto.a -lpthread ${LDFLAGS}
+#${CPP} -std=c++17 -I../lib/include ${CFLAGS} -D_FILE_OFFSET_BITS=64 -o "../bin/$ARCH/lpunpack" lpunpack.cc ../lib/lib/liblp.a ../lib/lib/libsparse.a ../lib/lib/libext4_utils.a ../lib/lib/libz.a ../lib/lib/libbase.a ../lib/lib/fmtlib.a ../lib/lib/liblog.a ../lib/lib/libcrypto_utils.a ../lib/lib/libcrypto.a -lpthread ${LDFLAGS}
+#${CPP} -std=c++17 -I../lib/include ${CFLAGS} -D_FILE_OFFSET_BITS=64 -o "../bin/$ARCH/lpdump" lpdump.cc dynamic_partitions_device_info.pb.cc lpdump_host.cc ../lib/lib/liblp.a ../lib/lib/libsparse.a ../lib/lib/libext4_utils.a ../lib/lib/libz.a ../lib/lib/libbase.a ../lib/lib/fmtlib.a ../lib/lib/liblog.a ../lib/lib/libcrypto_utils.a ../lib/lib/libcrypto.a ../lib/lib/libjsonpbparse.a ../lib/lib/libprotobuf-cpp-full.a -lpthread ${LDFLAGS}