44 lines
1.0 KiB
CMake
44 lines
1.0 KiB
CMake
cmake_minimum_required(VERSION 3.10)
|
|
|
|
|
|
# generate the compile_commands for vscode / clang
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
|
|
|
|
# set the project name
|
|
project(ModManager)
|
|
|
|
|
|
set(SOURCES
|
|
src/steam.c
|
|
src/install.c
|
|
src/overlayfs.c
|
|
src/getHome.c
|
|
src/file.c
|
|
src/order.c
|
|
src/fomod.c
|
|
src/fomod/group.c
|
|
src/fomod/xmlUtil.c
|
|
src/fomod/parser.c
|
|
)
|
|
|
|
# add the executable
|
|
add_executable(ModManager src/main.c ${SOURCES})
|
|
|
|
add_compile_options(-Wall -Wextra -pedantic -Werror)
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
pkg_search_module(GLIB REQUIRED glib-2.0)
|
|
pkg_search_module(AUDIT REQUIRED audit)
|
|
pkg_search_module(LIBXML REQUIRED libxml-2.0)
|
|
|
|
target_include_directories(ModManager PRIVATE ${GLIB_INCLUDE_DIRS} ${LIBXML_INCLUDE_DIRS} ${AUDIT_INCLUDE_DIRS})
|
|
|
|
add_compile_options(-fsanitize=address)
|
|
add_link_options(-fsanitize=address)
|
|
|
|
target_link_libraries(ModManager ${GLIB_LDFLAGS})
|
|
target_link_libraries(ModManager ${LIBXML_LIBRARIES})
|
|
target_link_libraries(ModManager ${AUDIT_LIBRARIES})
|
|
|
|
install(TARGETS ModManager DESTINATION bin)
|