CMake: change the order in which libraries are included

This commit is contained in:
2025-07-23 19:46:34 +03:00
parent d907ee9447
commit 18b5700cbd
4 changed files with 23 additions and 4 deletions

View File

@@ -35,7 +35,6 @@ generateBuildInfo(${FLAGS})
include_directories(include srclib/libhelper/include srclib/libpartition_map/include)
# Add libraries
add_subdirectory(srclib/libhelper)
add_subdirectory(srclib/libpartition_map)
add_subdirectory(srclib)
# NOTE: pmt is not ready, this CMakeFiles.txt only builds libraries

20
srclib/CMakeLists.txt Normal file
View File

@@ -0,0 +1,20 @@
#
# Copyright 2025 Yağız Zengin
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Add libraries
add_subdirectory(libhelper)
add_subdirectory(libpartition_map)

View File

@@ -14,7 +14,7 @@
# limitations under the License.
#
set(LIBHELPER_FLAGS -Wall -DLIB_BUILD_MODE)
set(LIBHELPER_FLAGS -DLIB_BUILD_MODE)
set(LIBHELPER_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/Checkers.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Classes.cpp

View File

@@ -20,7 +20,7 @@ set(LIBPARTITION_MAP_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/PartitionMap.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Type.cpp
)
set(LIBPARTITION_MAP_FLAGS -Wall -Werror -DLOG_FILE="/storage/emulated/0/.last_pmt.log" -DPROGRAM_NAME="libpartition_map")
set(LIBPARTITION_MAP_FLAGS -DLOG_FILE="/storage/emulated/0/.last_pmt.log" -DPROGRAM_NAME="libpartition_map")
# Add targets
add_library(partition_map_shared SHARED ${LIBPARTITION_MAP_SOURCES})