Skip to content

Commit 46c81f7

Browse files
committed
set PIC for linux
1 parent 49ba0c2 commit 46c81f7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Live2D/cmake/Core.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ add_library(Live2DCubismCore STATIC IMPORTED)
33
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
44
set(CSM_TARGET CSM_TARGET_LINUX_GL)
55
set(CORE_LIB_NAME linux/x86_64/libLive2DCubismCore.a)
6-
add_definitions(-fPIC)
6+
add_compile_options(-fPIC)
77
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")
88
set(CSM_TARGET CSM_TARGET_WIN_GL)
99
if (CMAKE_CL_64)

Live2D/cmake/Live2D.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ get_filename_component(LIVE2D_ROOT ${CMAKE_CURRENT_LIST_DIR} DIRECTORY)
22

33
message("Live2D Python Root: ${LIVE2D_ROOT}")
44

5+
include(${CMAKE_CURRENT_LIST_DIR}/Core.cmake)
56
if (CMAKE_SYSTEM_NAME MATCHES "Android")
67
else()
78
include(${CMAKE_CURRENT_LIST_DIR}/Glad.cmake)
89
add_library(Live2D::Glad ALIAS glad)
910
endif()
10-
11-
include(${CMAKE_CURRENT_LIST_DIR}/Core.cmake)
1211
include(${CMAKE_CURRENT_LIST_DIR}/Framework.cmake)
1312
include(${CMAKE_CURRENT_LIST_DIR}/Main.cmake)
1413

0 commit comments

Comments
 (0)