Second try for the hardcoded configs default path, this time putting
them in config.h where having spaces in path shouldnt matter. Removed the old solution. Also removed the base source dir from searched included paths because it's not needed (we only need base binary dir for "config.h") and it was "hiding" the config.h from the out of source build because #include saw a config.h (generated from an autotools build) in the source dir first.
This commit is contained in:
parent
fd8ef186b1
commit
443309c5db
6 changed files with 10 additions and 7 deletions
|
@ -31,6 +31,11 @@ check_library_exists(socket socket "" HAVE_LIBSOCKET)
|
|||
check_library_exists(resolv inet_aton "" HAVE_LIBRESOLV)
|
||||
check_library_exists(bind __inet_aton "" HAVE_LIBBIND)
|
||||
|
||||
# set default hardcoded config paths
|
||||
set(BNETD_DEFAULT_CONF_FILE "${SYSCONFDIR}/bnetd.conf")
|
||||
set(D2CS_DEFAULT_CONF_FILE "${SYSCONFDIR}/d2cs.conf")
|
||||
set(D2DBS_DEFAULT_CONF_FILE "${SYSCONFDIR}/d2dbs.conf")
|
||||
|
||||
# storage module checks
|
||||
if(WITH_MYSQL)
|
||||
find_package(MySQL REQUIRED)
|
||||
|
|
|
@ -112,4 +112,8 @@
|
|||
#cmakedefine HAVE__SNPRINTF
|
||||
#cmakedefine HAVE_SETPGRP
|
||||
|
||||
#cmakedefine BNETD_DEFAULT_CONF_FILE "${BNETD_DEFAULT_CONF_FILE}"
|
||||
#cmakedefine D2CS_DEFAULT_CONF_FILE "${D2CS_DEFAULT_CONF_FILE}"
|
||||
#cmakedefine D2DBS_DEFAULT_CONF_FILE "${D2DBS_DEFAULT_CONF_FILE}"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#first setup the includes and link paths
|
||||
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}
|
||||
include_directories(${CMAKE_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/src ${ZLIB_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR}
|
||||
${SQLITE3_INCLUDE_DIR})
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
add_definitions("-DBNETD_DEFAULT_CONF_FILE=\\\"${SYSCONFDIR}/bnetd.conf\\\"")
|
||||
|
||||
add_executable(bnetd
|
||||
account.cpp account.h account_wrap.cpp account_wrap.h adbanner.cpp
|
||||
adbanner.h alias_command.cpp alias_command.h anongame.cpp
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
add_definitions("-DD2CS_DEFAULT_CONF_FILE=\\\"${SYSCONFDIR}/d2cs.conf\\\"")
|
||||
|
||||
add_executable(d2cs
|
||||
bit.h bnetd.cpp bnetd.h cmdline.cpp cmdline.h connection.cpp
|
||||
connection.h d2charfile.cpp d2charfile.h d2charlist.cpp d2charlist.h
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
add_definitions("-DD2DBS_DEFAULT_CONF_FILE=\\\"${SYSCONFDIR}/d2dbs.conf\\\"")
|
||||
|
||||
add_executable(d2dbs
|
||||
charlock.cpp charlock.h cmdline.cpp cmdline.h d2ladder.cpp d2ladder.h
|
||||
dbsdupecheck.cpp dbsdupecheck.h dbserver.cpp dbserver.h dbspacket.cpp
|
||||
|
|
Loading…
Reference in a new issue