Skip to content

Commit

Permalink
fix: remove unnecessary find_package
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCui4080 committed Feb 21, 2024
1 parent 37d60f7 commit f856cda
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ set(CMAKE_CXX_STANDARD 23)
find_package(PkgConfig REQUIRED)
find_package(Boost REQUIRED)
find_package(SDL2 REQUIRED)
find_package(SDL2_Image REQUIRED)
find_package(SDL2_Mixer REQUIRED)
pkg_check_modules(ZIP libzip REQUIRED)

file(GLOB PROJ_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
Expand All @@ -22,10 +20,10 @@ add_link_options(-fsanitize=leak -fsanitize=address -fsanitize=undefined)

add_library(scratch3 ${PROJ_SRC})
target_include_directories(scratch3 PRIVATE ${BOOST_INCLUDE_DIRS} ${ZIP_INCLUDE_DIRS}
${SDL2_INCLUDE_DIRS} ${SDL2_Image_INCLUDE_DIRS} ${SDL2_Mixer_INCLUDE_DIRS})
${SDL2_INCLUDE_DIRS})

target_link_libraries(scratch3 ${BOOST_LIBRARIES} ${ZIP_LIBRARIES}
${SDL2_LIBRARIES} ${SDL2_Image_LIBRARIES} ${SDL2_Mixer_LIBRARIES})
${SDL2_LIBRARIES})

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
Expand Down

0 comments on commit f856cda

Please sign in to comment.