Skip to content

Commit c680e76

Browse files
authored
Merge pull request #306 from layus/fix-dist-target
Properly disable the dist target
2 parents 001e414 + caa4c7c commit c680e76

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,11 @@ endif()
7373

7474
if("${MOZART_BUILD_DIR}/" MATCHES "${MOZART_DIR}/.*")
7575
message(STATUS "Building inside the source tree: 'dist' target disabled")
76+
set(DIST_TARGET_ENABLED FALSE)
7677
else()
7778
message(STATUS "Building outside the source tree: 'dist' target enabled")
7879
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
80+
set(DIST_TARGET_ENABLED TRUE)
7981
configure_file(cmake_local/MozartConfigVersion.cmake.in
8082
${CMAKE_CURRENT_BINARY_DIR}/cmake_local/MozartConfigVersion.cmake @ONLY)
8183
define_property(GLOBAL PROPERTY SRCS_INSTALLED_DIRS

vm/boostenv/main/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ add_custom_target(genboostsources
103103
set_property(GLOBAL APPEND PROPERTY SRCS_INSTALLED_DIRS
104104
"${GENERATED_BOOSTSOURCES_DIR}" "/vm/boostenv/main/cached/")
105105

106-
add_dependencies(dist genboostsources)
106+
if(DIST_TARGET_ENABLED)
107+
add_dependencies(dist genboostsources)
108+
endif()
107109

108110
# Boost environment library
109111
include_directories(${GENERATED_BOOSTSOURCES_DIR})

vm/vm/main/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ add_custom_target(gensources
7272
set_property(GLOBAL APPEND PROPERTY SRCS_INSTALLED_DIRS
7373
"${GENERATED_SOURCES_DIR}" "/vm/vm/main/cached/")
7474

75-
add_dependencies(dist gensources)
75+
if (DIST_TARGET_ENABLED)
76+
add_dependencies(dist gensources)
77+
endif()
7678

7779

7880
# Build the library

0 commit comments

Comments
 (0)