forked from notspiff/game.libretro.beetle-wswan
-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
26 lines (19 loc) · 953 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
cmake_minimum_required(VERSION 3.5)
project(game.libretro.beetle-wswan)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
find_package(Kodi REQUIRED)
set(CMAKE_CXX_STANDARD 17)
# CMake on windows only searches for .lib libraries (static library or import library).
# The libretro game library is dynamically loaded so even if an import library would exists it's of no use.
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
set(_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
find_library(BEETLE-WSWAN_LIB NAMES mednafen_wswan_libretro${CMAKE_SHARED_LIBRARY_SUFFIX} PATH_SUFFIXES libretro)
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_CMAKE_FIND_LIBRARY_SUFFIXES})
endif()
set(BEETLE-WSWAN_CUSTOM_BINARY ${BEETLE-WSWAN_LIB}
${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
build_addon(${PROJECT_NAME} BEETLE-WSWAN "")
include(CPack)