make resource_file required

This commit is contained in:
Martin Michelsen
2025-03-18 18:59:16 -07:00
parent 595675df20
commit 6328453d38
7 changed files with 10 additions and 80 deletions
+3 -10
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.22)
set(CMAKE_POLICY_DEFAULT_CMP0110 NEW)
@@ -31,7 +31,7 @@ set (LIBEVENT_LIBRARIES
find_package(phosg REQUIRED)
find_package(Iconv REQUIRED)
find_package(resource_file QUIET)
find_package(resource_file REQUIRED)
@@ -141,14 +141,7 @@ endif()
add_executable(newserv ${SOURCES})
target_include_directories(newserv PUBLIC ${LIBEVENT_INCLUDE_DIR} ${Iconv_INCLUDE_DIRS})
target_link_libraries(newserv phosg::phosg ${LIBEVENT_LIBRARIES} ${Iconv_LIBRARIES} pthread)
if(resource_file_FOUND)
target_compile_definitions(newserv PUBLIC HAVE_RESOURCE_FILE)
target_link_libraries(newserv resource_file::resource_file)
message(STATUS "resource_file found; enabling patch support")
else()
message(WARNING "resource_file not found; disabling patch support")
endif()
target_link_libraries(newserv phosg::phosg ${LIBEVENT_LIBRARIES} ${Iconv_LIBRARIES} pthread resource_file::resource_file)
add_dependencies(newserv newserv-Revision-cc)
# target_compile_options(newserv PRIVATE -fsanitize=address)