Skip to content

Commit

Permalink
v8, refactor: use relative path in cmake.
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed Jan 6, 2023
1 parent 2b08a65 commit 206805d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 18 deletions.
6 changes: 0 additions & 6 deletions jssdk/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
cmake_minimum_required(VERSION 2.6)

include_directories(
"${PROJECT_SOURCE_DIR}/../v8"
"${PROJECT_SOURCE_DIR}/../v8/include"
"${PROJECT_SOURCE_DIR}/.."
)

include(../v8/cmake/options.cmake)

include(../build_tools/cmake/Library.cmake)
2 changes: 1 addition & 1 deletion jssdk/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ cmake_minimum_required(VERSION 2.6)
set(test_libs gtest)
set(libs v8 exlib)

include_directories("${PROJECT_SOURCE_DIR}/../../v8/include")
include(../../v8/cmake/options.cmake)

include(../../build_tools/cmake/LibraryTest.cmake)
9 changes: 6 additions & 3 deletions v8/cmake/options.cmake
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
include_directories(${PROJECT_SOURCE_DIR})
include_directories(
${CMAKE_CURRENT_LIST_DIR}/..
${CMAKE_CURRENT_LIST_DIR}/../include
)

if(${ARCH} MATCHES "64")
include_directories(${PROJECT_SOURCE_DIR}/gen/64)
include_directories(${CMAKE_CURRENT_LIST_DIR}/../gen/64)
else()
include_directories(${PROJECT_SOURCE_DIR}/gen/32)
include_directories(${CMAKE_CURRENT_LIST_DIR}/../gen/32)
endif()

if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
Expand Down
8 changes: 0 additions & 8 deletions v8/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,5 @@ cmake_minimum_required(VERSION 2.6)
set(test_libs gtest)
set(libs exlib)

include_directories(${PROJECT_SOURCE_DIR}/..)

if(${ARCH} MATCHES "64")
include_directories(${PROJECT_SOURCE_DIR}/../gen/64)
else()
include_directories(${PROJECT_SOURCE_DIR}/../gen/32)
endif()

include(../cmake/options.cmake)
include(../../build_tools/cmake/LibraryTest.cmake)

0 comments on commit 206805d

Please sign in to comment.