Skip to content

CMAKE_SOURCE_DIR => CMAKE_CURRENT_SOURCE_DIR #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ set(CMAKE_INSTALL_CONFIG_NAME ${CMAKE_BUILD_TYPE})

cmake_dependent_option(BUILD_TESTING
"Build the unit tests when BUILD_TESTING is enabled and we are the root project" ON
"BUILD_TESTING;CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF)
"BUILD_TESTING;CMAKE_CURRENT_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR" OFF)
option(BUILD_SHARED_LIBS "Build the library as a shared (dynamically-linked) " OFF)

include(TargetArch)
Expand All @@ -91,7 +91,7 @@ elseif(APPLE)
set(NATIVE_ARCH ${TARGET_ARCH}-osx)
endif()

set(TCC_DIR ${CMAKE_SOURCE_DIR})
set(TCC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(INC_DIR ${TCC_DIR}/include)
set(SRC_DIR ${TCC_DIR}/src)
set(WIN_DIR ${SRC_DIR}/win32)
Expand Down
Loading