Skip to content

Commit

Permalink
fix linux cmake build
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjipeng committed Jun 3, 2024
1 parent 7c75983 commit b3305e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ext/image_loader/image.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ add_library(psx_image ${PXIMG_SOURCES})
include_directories(${PXIMG_DIR} ${PROJECT_ROOT}/include)
target_link_libraries(psx_image PRIVATE picasso2_sw)

if (UNIX AND NOT APPLE)
target_link_libraries(psx_image PUBLIC dl)
endif()

if (NOT APPLE)
include (${PXIMG_DIR}/png/png.cmake)
include (${PXIMG_DIR}/jpeg/jpeg.cmake)
Expand Down
9 changes: 6 additions & 3 deletions src/src.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ if (WIN32)
${PROJECT_ROOT}/src/picasso.def
${PROJECT_ROOT}/src/resource.h
)
elseif (UNIX AND NOT APPLE)
endif()

add_definitions(-DEXPORT)
add_library(picasso2_sw ${SOURCES})

if (UNIX AND NOT APPLE)
find_package(Freetype REQUIRED)
find_package(Fontconfig REQUIRED)
target_include_directories(picasso2_sw PRIVATE ${FREETYPE_INCLUDE_DIRS} ${FONTCONFIG_INCLUDE_DIRS})
target_link_libraries(picasso2_sw PUBLIC Freetype::Freetype Fontconfig::Fontconfig)
elseif (APPLE)
endif()

add_definitions(-DEXPORT)
add_library(picasso2_sw ${SOURCES})

0 comments on commit b3305e7

Please sign in to comment.