mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 11:14:39 +00:00
Refactor CMakeLists.txt for improved organization and add test data copying
This commit is contained in:
@@ -1,11 +1,47 @@
|
||||
project(aaruformattool)
|
||||
# Tool executable project
|
||||
project(aaruformattool C CXX)
|
||||
|
||||
# Find required dependencies
|
||||
find_package(ICU COMPONENTS uc REQUIRED)
|
||||
find_package(Argtable3 CONFIG REQUIRED)
|
||||
|
||||
include_directories(${ICU_INCLUDE_DIRS})
|
||||
# Tool executable
|
||||
add_executable(aaruformattool
|
||||
main.c
|
||||
version.h
|
||||
aaruformattool.h
|
||||
identify.c
|
||||
info.c
|
||||
helpers.c
|
||||
read.c
|
||||
printhex.c
|
||||
verify.c
|
||||
ecc_cd.c
|
||||
commands.h
|
||||
commands.c
|
||||
usage.h
|
||||
usage.c
|
||||
compare.c
|
||||
cli_compare.c
|
||||
convert.c
|
||||
termbox2.h
|
||||
)
|
||||
|
||||
add_executable(aaruformattool main.c version.h aaruformattool.h identify.c info.c helpers.c read.c printhex.c verify.c ecc_cd.c
|
||||
commands.h commands.c usage.h usage.c compare.c cli_compare.c convert.c termbox2.h)
|
||||
target_link_libraries(aaruformattool "aaruformat" argtable3::argtable3)
|
||||
target_link_libraries(aaruformattool "aaruformat" ICU::uc)
|
||||
# Set C as the linker language (even though we enable CXX for stdlib)
|
||||
set_target_properties(aaruformattool PROPERTIES LINKER_LANGUAGE C)
|
||||
|
||||
# Set up include directories
|
||||
target_include_directories(aaruformattool PRIVATE ${ICU_INCLUDE_DIRS})
|
||||
|
||||
# Link libraries
|
||||
target_link_libraries(aaruformattool
|
||||
PRIVATE
|
||||
aaruformat
|
||||
argtable3::argtable3
|
||||
ICU::uc
|
||||
)
|
||||
|
||||
# On macOS/iOS, explicitly link the C++ standard library for ICU dependencies
|
||||
if(APPLE)
|
||||
target_link_libraries(aaruformattool PRIVATE "-lc++")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user