Skip to content

Commit

Permalink
针对Windows平台修改CMAKE配置
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanyiaini committed Apr 11, 2024
1 parent e7886a4 commit d2e76da
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@ IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
add_compile_options(-fPIC)
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows")
MESSAGE(STATUS "Current platform: Windows")
MESSAGE(STATUS "Current compiler: ${CMAKE_CXX_COMPILER_ID}")
IF (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
#MSVC compiler
add_compile_options("/utf-8")
add_definitions(-DWIN32_LEAN_AND_MEAN)
ELSEIF (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
#MinGW compiler
ENDIF (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux")
#or
#set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down
2 changes: 1 addition & 1 deletion python/examples/gs_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
while ret and ydlidar.os_isOk() :
r = laser.doProcessSimple(scan);
if r:
print("Scan received[",scan.stamp,"]:",scan.points.size(),"ranges is [",1.0/scan.config.scan_time,"]Hz");
print("Scan received[",scan.stamp,"]:",scan.points.size());
else :
print("Failed to get Lidar Data.")
time.sleep(0.05);
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def build_extension(self, ext):

setup(
name='ydlidar',
version='1.1.7',
version='1.2.4',
author='EAI',
author_email='[email protected]',
url='https://github.com/YDLIDAR/YDLidar-SDK',
Expand Down

0 comments on commit d2e76da

Please sign in to comment.