Skip to content

Commit

Permalink
Apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
alef committed Jan 16, 2025
1 parent e57ac38 commit 5e4d0bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
4 changes: 3 additions & 1 deletion CMakeModules/ListImportedTargets.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# A simple debug script showing the locations of imported target.
# There is no load-bearing functionality.
function(ListImportedTargets dir)
message(DEBUG "List of imported targets in ${dir}:")
get_property(tgts DIRECTORY ${dir} PROPERTY IMPORTED_TARGETS)
Expand All @@ -16,4 +18,4 @@ function(ListImportedTargets dir)
message(DEBUG " ${VAR}=${p}")
endforeach()
endforeach()
endfunction()
endfunction()
17 changes: 6 additions & 11 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,6 @@ if (TILES)
install(TARGETS cataclysm-tiles RUNTIME)
endif ()

if (TARGET ZLIB::ZLIB)
target_link_libraries(cataclysm-tiles-common PUBLIC ZLIB::ZLIB)
else()
target_link_libraries(cataclysm-tiles-common PUBLIC ${ZLIB_LIBRARIES})
endif()

endif ()

# Build curses version if requested
Expand Down Expand Up @@ -206,11 +200,6 @@ if (CURSES)
${CURSES_INCLUDE_DIR} ${NCURSES_INCLUDE_DIRS}
)
target_link_libraries(cataclysm-common PUBLIC ${CURSES_LIBRARIES})
if (TARGET ZLIB::ZLIB)
target_link_libraries(cataclysm-common PUBLIC ZLIB::ZLIB)
else()
target_link_libraries(cataclysm-common PUBLIC ${ZLIB_LIBRARIES})
endif()

if (CMAKE_USE_PTHREADS_INIT)
target_compile_options(cataclysm-common PUBLIC "-pthread")
Expand Down Expand Up @@ -247,6 +236,12 @@ if (CURSES)
endif ()
endif ()

if (TARGET ZLIB::ZLIB)
target_link_libraries(cataclysm-common PUBLIC ZLIB::ZLIB)
else()
target_link_libraries(cataclysm-common PUBLIC ${ZLIB_LIBRARIES})
endif()

if (MINGW AND NOT RELEASE)
# Try to Install shared libraries for dev builds
# Note: It is specific to MSYS2 and uses hardcoded versions so
Expand Down

0 comments on commit 5e4d0bc

Please sign in to comment.