use new CMake configs from phosg and resource_dasm
This commit is contained in:
+10
-15
@@ -14,12 +14,6 @@ else()
|
||||
add_compile_options(-Wall -Wextra -Werror -Wno-address-of-packed-member)
|
||||
endif()
|
||||
|
||||
set(LOCAL_INCLUDE_DIR "/usr/local/include")
|
||||
set(LOCAL_LIB_DIR "/usr/local/lib")
|
||||
list(APPEND CMAKE_PREFIX_PATH ${LOCAL_LIB_DIR})
|
||||
include_directories(${LOCAL_INCLUDE_DIR})
|
||||
link_directories(${LOCAL_LIB_DIR})
|
||||
|
||||
|
||||
|
||||
# Library search
|
||||
@@ -141,20 +135,19 @@ endif()
|
||||
|
||||
add_executable(newserv ${SOURCES})
|
||||
target_include_directories(newserv PUBLIC ${LIBEVENT_INCLUDE_DIR} ${Iconv_INCLUDE_DIRS})
|
||||
target_link_libraries(newserv phosg ${LIBEVENT_LIBRARIES} ${Iconv_LIBRARIES} pthread)
|
||||
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()
|
||||
add_dependencies(newserv newserv-Revision-cc)
|
||||
|
||||
# target_compile_options(newserv PRIVATE -fsanitize=address)
|
||||
# target_link_options(newserv PRIVATE -fsanitize=address)
|
||||
|
||||
if(resource_file_FOUND)
|
||||
target_compile_definitions(newserv PUBLIC HAVE_RESOURCE_FILE)
|
||||
target_link_libraries(newserv resource_file)
|
||||
message(STATUS "libresource_file found; enabling patch support")
|
||||
else()
|
||||
message(WARNING "libresource_file not found; disabling patch support")
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
# Test configuration
|
||||
@@ -179,6 +172,8 @@ foreach(ScriptTestCase IN ITEMS ${ScriptTestCases})
|
||||
COMMAND ${ScriptTestCase} ${CMAKE_BINARY_DIR}/newserv)
|
||||
endforeach()
|
||||
|
||||
|
||||
|
||||
# Installation configuration
|
||||
|
||||
install(TARGETS newserv DESTINATION bin)
|
||||
|
||||
+6
-1
@@ -2510,7 +2510,12 @@ Action a_run_server_replay_log(
|
||||
"", nullptr, +[](phosg::Arguments& args) {
|
||||
{
|
||||
string build_date = phosg::format_time(BUILD_TIMESTAMP);
|
||||
config_log.info("newserv %s compiled at %s", GIT_REVISION_HASH, build_date.c_str());
|
||||
#ifdef HAVE_RESOURCE_FILE
|
||||
const char* resource_file_str = " with client function support";
|
||||
#else
|
||||
const char* resource_file_str = " without client function support";
|
||||
#endif
|
||||
config_log.info("newserv %s compiled%s at %s", GIT_REVISION_HASH, resource_file_str, build_date.c_str());
|
||||
}
|
||||
|
||||
if (evthread_use_pthreads()) {
|
||||
|
||||
Reference in New Issue
Block a user