Matthew Woehlke 95d84369b8 Tests: Add test for exported JARs
Add a unit test to test the new functions to export JAR targets. The
test builds three sub-projects: two that generate and export a JAR (one
does a build-directory-only export, one an install-only export), and a
third that consumes the first two as imported targets.
2016-06-07 08:50:36 -04:00

15 lines
348 B
CMake

project(bar Java)
cmake_minimum_required (VERSION 3.5)
set(CMAKE_VERBOSE_MAKEFILE 1)
find_package(Java COMPONENTS Development)
include(UseJava)
add_jar(${PROJECT_NAME} Bar.java)
install_jar(${PROJECT_NAME} DESTINATION share/java)
install_jar_exports(
TARGETS ${PROJECT_NAME}
FILE JavaInstallExportTestConfig.cmake
DESTINATION share/cmake)