fix issue #25
This commit is contained in:
parent
f793114403
commit
894e7cca5e
@ -115,20 +115,20 @@ elseif (APPLE)
|
|||||||
add_definitions(-DUSE_METAL_API)
|
add_definitions(-DUSE_METAL_API)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
link_libraries("-framework Cocoa")
|
#link_libraries("-framework Cocoa")
|
||||||
link_libraries("-framework QuartzCore")
|
#link_libraries("-framework QuartzCore")
|
||||||
link_libraries("-framework Metal")
|
#link_libraries("-framework Metal")
|
||||||
link_libraries("-framework MetalKit")
|
#link_libraries("-framework MetalKit")
|
||||||
|
|
||||||
list(APPEND SrcLib ${SrcMacOSX})
|
list(APPEND SrcLib ${SrcMacOSX})
|
||||||
elseif (UNIX)
|
elseif (UNIX)
|
||||||
if(USE_WAYLAND_API)
|
if(USE_WAYLAND_API)
|
||||||
link_libraries("-lwayland-client")
|
#link_libraries("-lwayland-client")
|
||||||
link_libraries("-lwayland-cursor")
|
#link_libraries("-lwayland-cursor")
|
||||||
|
|
||||||
list(APPEND SrcLib ${SrcWayland})
|
list(APPEND SrcLib ${SrcWayland})
|
||||||
else()
|
else()
|
||||||
link_libraries("-lX11")
|
#link_libraries("-lX11")
|
||||||
|
|
||||||
list(APPEND SrcLib ${SrcX11})
|
list(APPEND SrcLib ${SrcX11})
|
||||||
endif()
|
endif()
|
||||||
@ -140,10 +140,26 @@ add_library(minifb STATIC
|
|||||||
${SrcLib}
|
${SrcLib}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#--------------------------------------
|
||||||
|
if (APPLE)
|
||||||
|
target_link_libraries(minifb "-framework Cocoa")
|
||||||
|
target_link_libraries(minifb "-framework QuartzCore")
|
||||||
|
target_link_libraries(minifb "-framework Metal")
|
||||||
|
target_link_libraries(minifb "-framework MetalKit")
|
||||||
|
elseif (UNIX)
|
||||||
|
if(USE_WAYLAND_API)
|
||||||
|
target_link_libraries(minifb "-lwayland-client")
|
||||||
|
target_link_libraries(minifb "-lwayland-cursor")
|
||||||
|
else()
|
||||||
|
target_link_libraries(minifb "-lX11")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# For all projects
|
# For all projects
|
||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
target_include_directories(minifb PUBLIC include)
|
target_include_directories(minifb PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
|
||||||
target_include_directories(minifb PRIVATE src)
|
target_include_directories(minifb PRIVATE src)
|
||||||
|
|
||||||
link_libraries(minifb)
|
link_libraries(minifb)
|
||||||
|
|
||||||
# Examples
|
# Examples
|
||||||
|
Loading…
Reference in New Issue
Block a user