Skip to content

Commit f45ceea

Browse files
committed
Merge pull request #205 from layus/sbt
Remove the need for sbt during 'make install'
2 parents 85eb306 + 11dd63a commit f45ceea

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

bootcompiler/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@ set(SBT_JAVA_OPTS
1010
set(SBT "${Java_JAVA_EXECUTABLE}" ${SBT_JAVA_OPTS} -Dfile.encoding=UTF-8
1111
-jar "${CMAKE_CURRENT_SOURCE_DIR}/sbt-launch.jar")
1212

13-
add_custom_target(bootcompiler
14-
ALL
13+
file(GLOB_RECURSE bootcompiler_sources src/*)
14+
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/bootcompiler.jar"
1515
COMMAND ${SBT} one-jar
16-
COMMAND ${CMAKE_COMMAND} -E copy_if_different
16+
COMMAND ${CMAKE_COMMAND} -E copy
1717
"${CMAKE_CURRENT_SOURCE_DIR}/target/scala-2.9.1/bootcompiler_2.9.1-2.0-SNAPSHOT-one-jar.jar"
1818
"${CMAKE_CURRENT_BINARY_DIR}/bootcompiler.jar"
1919
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
20+
DEPENDS "sbt-launch.jar" "build.sbt" "project/plugins.sbt" ${bootcompiler_sources}
2021
COMMENT "Building the bootcompiler"
2122
VERBATIM)
23+
24+
add_custom_target(bootcompiler DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/bootcompiler.jar")

0 commit comments

Comments
 (0)