forked from notspiff/game.libretro.bluemsx
-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
26 lines (19 loc) · 921 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.bluemsx)
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(BLUEMSX_LIB NAMES bluemsx_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(BLUEMSX_CUSTOM_BINARY ${BLUEMSX_LIB}
${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
build_addon(${PROJECT_NAME} BLUEMSX "")
include(CPack)