Skip to content

Commit

Permalink
fix: Arreglo detalles del cmake
Browse files Browse the repository at this point in the history
No pude arreglar el instalador
  • Loading branch information
nacho-1 committed Jun 27, 2023
1 parent c4084b4 commit b15ddad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ project(Left4Dead
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")

option(DEBUG "Compile in debug mode" OFF)
if (DEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -ggdb")
Expand Down
16 changes: 5 additions & 11 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
option(INSTALL "Apply install settings" OFF)
if (INSTALL EQUAL OFF)
if (INSTALL EQUAL ON)
message(STATUS "Applying install settings")
set(CONFIG_FILE "/var/games/l4d/configurations.yaml")
set(BINDIR "/usr/local/bin")
set(VARDIR "/var/games/l4d")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
else()
set(CONFIG_FILE "${CMAKE_SOURCE_DIR}/configurations.yaml")
set(BINDIR ${CMAKE_BINARY_DIR})
Expand Down Expand Up @@ -190,7 +189,6 @@ if(CLIENT)

# Use the Widgets module from Qt 5.
target_link_libraries(l4dclient PUBLIC Qt5::Widgets Qt5::Core)

#add_subdirectory(${PROJECT_SOURCE_DIR}/src/graphics_lobby)
#target_link_libraries(l4dclient PUBLIC lobby)
target_link_libraries(l4dclient PUBLIC gameview)
Expand All @@ -204,24 +202,20 @@ if(CLIENT)
endif()

if(SERVER AND INSTALL)
install (FILES ${CMAKE_SOURCE_DIR}/configurations.yaml
install (FILES "${CMAKE_SOURCE_DIR}/configurations.yaml"
DESTINATION ${VARDIR})
install(TARGETS l4dserver
RUNTIME DESTINATION ${BINDIR}
)
endif()

if(CLIENT AND INSTALL)
install(TARGETS SDL2pp
ARCHIVE DESTINATION ${LIBDIR}
)

install(TARGETS l4dclient
RUNTIME DESTINATION ${BINDIR}
)
install(TARGETS SDL2pp
ARCHIVE DESTINATION ${LIBDIR}
LIBRARY DESTINATION ${LIBDIR}
)

)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/assets
DESTINATION ${VARDIR}
)
Expand Down

0 comments on commit b15ddad

Please sign in to comment.