STYLE: add some more output, so it is easier to understand
Alex
This commit is contained in:
parent
e126db1f71
commit
7f1fbe4e4c
|
@ -1,19 +1,22 @@
|
|||
PROJECT(hello Java)
|
||||
SET(CMAKE_VERBOSE_MAKEFILE 1)
|
||||
|
||||
SET(OLD_CUSTOM_COMMAND_WAY )
|
||||
message("${hello_SOURCE_DIR} STREQUAL ${hello_BINARY_DIR}")
|
||||
IF("${hello_SOURCE_DIR}" STREQUAL "${hello_BINARY_DIR}")
|
||||
MESSAGE("In Source, building Java using ADD_CUSTOM_COMMAND()")
|
||||
SET(OLD_CUSTOM_COMMAND_WAY 1)
|
||||
ELSE("${hello_SOURCE_DIR}" STREQUAL "${hello_BINARY_DIR}")
|
||||
MESSAGE("Out of source, using built-in Java support")
|
||||
SET(OLD_CUSTOM_COMMAND_WAY )
|
||||
ENDIF("${hello_SOURCE_DIR}" STREQUAL "${hello_BINARY_DIR}")
|
||||
|
||||
IF(NOT OLD_CUSTOM_COMMAND_WAY)
|
||||
|
||||
INCLUDE_DIRECTORIES(${hello_SOURCE_DIR}
|
||||
${hello_BINARY_DIR} )
|
||||
ADD_LIBRARY(hello A.java HelloWorld.java)
|
||||
ENDIF(NOT OLD_CUSTOM_COMMAND_WAY)
|
||||
|
||||
ELSE(NOT OLD_CUSTOM_COMMAND_WAY)
|
||||
|
||||
IF(OLD_CUSTOM_COMMAND_WAY)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${hello_BINARY_DIR}/A.class
|
||||
MAIN_DEPENDENCY ${hello_SOURCE_DIR}/A.java
|
||||
|
@ -33,4 +36,6 @@ IF(OLD_CUSTOM_COMMAND_WAY)
|
|||
|
||||
ADD_CUSTOM_TARGET(hello.jar ALL
|
||||
DEPENDS ${hello_BINARY_DIR}/hello.jar)
|
||||
ENDIF(OLD_CUSTOM_COMMAND_WAY)
|
||||
|
||||
ENDIF(NOT OLD_CUSTOM_COMMAND_WAY)
|
||||
|
||||
|
|
Loading…
Reference in New Issue