comparison JavaSDK/CMakeLists.txt @ 0:3ecef5782f2c

initial commit
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 18 Oct 2023 17:59:44 +0200
parents
children f3f1be77853f
comparison
equal deleted inserted replaced
-1:000000000000 0:3ecef5782f2c
1 # SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium
2 # SPDX-License-Identifier: GPL-3.0-or-later
3
4 # Java plugin for Orthanc
5 # Copyright (C) 2023 Sebastien Jodogne, UCLouvain, Belgium
6 #
7 # This program is free software: you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License as
9 # published by the Free Software Foundation, either version 3 of the
10 # License, or (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20
21 cmake_minimum_required(VERSION 3.0)
22
23 project(OrthancJavaSDK)
24
25 find_package(Java REQUIRED)
26 include(UseJava)
27
28 set(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.8" "-target" "1.8" "-Xdoclint:all/protected")
29
30 file(GLOB JAVA_SOURCES
31 ${CMAKE_SOURCE_DIR}/be/uclouvain/orthanc/*.java
32 )
33
34 set(JAVADOC_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/Documentation")
35 file(MAKE_DIRECTORY ${JAVADOC_OUTPUT_DIR})
36
37 add_jar(OrthancJavaSDK
38 ${JAVA_SOURCES}
39 DEPENDS CreateJavadocDirectory
40 )
41
42 add_custom_command(TARGET OrthancJavaSDK
43 POST_BUILD
44 COMMAND ${Java_JAVADOC_EXECUTABLE} -Xdoclint:all ${JAVA_SOURCES}
45 WORKING_DIRECTORY ${JAVADOC_OUTPUT_DIR}
46 COMMENT "Generating SDK documentation with javadoc" VERBATIM
47 )