Skip to content

Commit f25d620

Browse files
committed
fix: update python version and add sampgdk library to cmake
1 parent eadbd3b commit f25d620

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/CMakeLists.txt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ project(PySAMP)
33
add_compile_options(-std=c++11)
44

55

6-
cmake_minimum_required(VERSION 2.8)
6+
cmake_minimum_required(VERSION 3.12)
77
list(APPEND CMAKE_MODULE_PATH ${SAMPGDK_DIR}/cmake)
88

99
#find_package (Python3 COMPONENTS Interpreter Development)
1010

11-
find_package (PythonInterp 3.5.2)
12-
find_package (PythonLibs 3.5.2)
11+
find_package (Python 3.8.2)
12+
find_package (PythonLibs 3.8.2)
13+
14+
find_library (SAMPGDK_LIBRARY
15+
NAMES sampgdk sampgdk4s
16+
HINTS "${CMAKE_PREFIX_PATH}/lib/")
1317

1418
include(AMXConfig)
1519
include(AddSAMPPlugin)
@@ -28,6 +32,7 @@ include_directories(
2832
message(STATUS "PYTHON_LIBRARY = ${PYTHON_LIBRARY}")
2933
message(STATUS "PYTHON_EXECUTABLE = ${PYTHON_EXECUTABLE}")
3034
message(STATUS "PYTHON_INCLUDE_DIR = ${PYTHON_INCLUDE_DIR}")
35+
message(STATUS "SAMPGDK_LIBRARY = ${SAMPGDK_LIBRARY}")
3136

3237
add_definitions(-DSAMPGDK_AMALGAMATION)
3338

@@ -52,7 +57,7 @@ add_samp_plugin(PySAMP
5257
test/callbackstest.cpp
5358
)
5459

55-
target_link_libraries(PySAMP sampgdk)
60+
target_link_libraries(PySAMP ${SAMPGDK_LIBRARY})
5661

5762
find_package(Doxygen)
5863
if(DOXYGEN_FOUND)

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#define VERSION "1.1.0-100"
1+
#define VERSION "1.1.0-200"
22

33
#include <stdio.h>
44
#include <string.h>

0 commit comments

Comments
 (0)