Avoid CMake error when WITH_LUA is not set
This commit is contained in:
parent
143e5cd4dd
commit
081ec359ba
1 changed files with 6 additions and 2 deletions
|
@ -54,14 +54,18 @@ target_include_directories(bnetd
|
|||
$<INSTALL_INTERFACE:include/>
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
${CURL_INCLUDE_DIRS}
|
||||
${LUA_INCLUDE_DIR}
|
||||
${MYSQL_INCLUDE_DIR}
|
||||
${SQLITE3_INCLUDE_DIR}
|
||||
${PGSQL_INCLUDE_DIR}
|
||||
${ODBC_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(bnetd PRIVATE common compat fmt Threads::Threads win32 ${NETWORK_LIBRARIES} ${ZLIB_LIBRARIES} ${CURL_LIBRARIES} ${MYSQL_LIBRARIES} ${SQLITE3_LIBRARIES} ${PGSQL_LIBRARIES} ${ODBC_LIBRARIES} ${LUA_LIBRARIES})
|
||||
target_link_libraries(bnetd PRIVATE common compat fmt Threads::Threads win32 ${NETWORK_LIBRARIES} ${ZLIB_LIBRARIES} ${CURL_LIBRARIES} ${MYSQL_LIBRARIES} ${SQLITE3_LIBRARIES} ${PGSQL_LIBRARIES} ${ODBC_LIBRARIES})
|
||||
|
||||
if (WITH_LUA)
|
||||
target_include_directories(bnetd PRIVATE ${LUA_INCLUDE_DIR})
|
||||
target_link_libraries(bnetd PRIVATE ${LUA_LIBRARIES})
|
||||
endif()
|
||||
|
||||
install(TARGETS bnetd DESTINATION ${SBINDIR})
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue