Skip to content

Commit

Permalink
build(cmake): respect third_party_dir env variable (#3497)
Browse files Browse the repository at this point in the history
* build(cmake): respect THIRD_PARTY_DIR env variable

Fixes cmake configure issue where some editor utilize CMakeLists.txt
directly

* chore(cmake): add a message
  • Loading branch information
aceforeverd authored Nov 24, 2023
1 parent 25a24dc commit 7d89892
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@ if (CMAKE_BUILD_TYPE STREQUAL "")
endif ()

if (NOT DEFINED CMAKE_PREFIX_PATH)
set(CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/.deps/usr")
if (DEFINED ENV{THIRD_PARTY_DIR})
set(CMAKE_PREFIX_PATH $ENV{THIRD_PARTY_DIR})
else()
set(CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}/.deps/usr")
endif()
endif()

message (STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")
message (STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
set(OPENMLDB_VERSION_MAJOR 0)
set(OPENMLDB_VERSION_MINOR 8)
Expand Down

0 comments on commit 7d89892

Please sign in to comment.