summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMickael Savinaud <savmickael@users.noreply.github.com>2012-08-30 17:20:03 +0000
committerMickael Savinaud <savmickael@users.noreply.github.com>2012-08-30 17:20:03 +0000
commit3135642ff5c747d674b1a5347f4a3dd6352b6c75 (patch)
treea434de1167f2ed257556fc150bb49eb404c1b6fa /CMakeLists.txt
parentd5bb3b0039159a61c7e9b2ae157a7b6ec2c0aef5 (diff)
[trunk] Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Thanks to Hans Johnson
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt56
1 files changed, 28 insertions, 28 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e3a8144..f779df55 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,12 +11,12 @@ cmake_minimum_required(VERSION 2.6)
if(COMMAND CMAKE_POLICY)
cmake_policy(SET CMP0003 NEW)
-endif(COMMAND CMAKE_POLICY)
+endif()
if(NOT OPENJPEG_NAMESPACE)
set(OPENJPEG_NAMESPACE "OPENJPEG")
set(OPENJPEG_STANDALONE 1)
-endif(NOT OPENJPEG_NAMESPACE)
+endif()
# In all cases:
string(TOLOWER ${OPENJPEG_NAMESPACE} OPENJPEG_LIBRARY_NAME)
@@ -65,11 +65,11 @@ if(WIN32)
-D_CRT_VCCLRIT_NO_DEPRECATE
-D_SCL_SECURE_NO_DEPRECATE
)
- endif(NOT ITK_ENABLE_VISUAL_STUDIO_DEPRECATED_C_WARNINGS)
- endif(NOT MINGW)
- endif(NOT CYGWIN)
- endif(NOT BORLAND)
-endif(WIN32)
+ endif()
+ endif()
+ endif()
+ endif()
+endif()
# --------------------------------------------------------------------------
@@ -80,38 +80,38 @@ set(OPENJPEG_INSTALL_SUBDIR "${projectname}-${OPENJPEG_VERSION_MAJOR}.${OPENJPEG
if(NOT OPENJPEG_INSTALL_BIN_DIR)
set(OPENJPEG_INSTALL_BIN_DIR "bin")
-endif(NOT OPENJPEG_INSTALL_BIN_DIR)
+endif()
if(NOT OPENJPEG_INSTALL_LIB_DIR)
set(OPENJPEG_INSTALL_LIB_DIR "lib")
-endif(NOT OPENJPEG_INSTALL_LIB_DIR)
+endif()
if(NOT OPENJPEG_INSTALL_SHARE_DIR)
set(OPENJPEG_INSTALL_SHARE_DIR "share")
-endif(NOT OPENJPEG_INSTALL_SHARE_DIR)
+endif()
if(NOT OPENJPEG_INSTALL_DATA_DIR)
set(OPENJPEG_INSTALL_DATA_DIR "${OPENJPEG_INSTALL_SHARE_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
-endif(NOT OPENJPEG_INSTALL_DATA_DIR)
+endif()
if(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
set(OPENJPEG_INSTALL_INCLUDE_DIR "include/${OPENJPEG_INSTALL_SUBDIR}")
-endif(NOT OPENJPEG_INSTALL_INCLUDE_DIR)
+endif()
if(NOT OPENJPEG_INSTALL_MAN_DIR)
set(OPENJPEG_INSTALL_MAN_DIR "share/man/")
-endif(NOT OPENJPEG_INSTALL_MAN_DIR)
+endif()
if(NOT OPENJPEG_INSTALL_DOC_DIR)
set(OPENJPEG_INSTALL_DOC_DIR "share/doc/${OPENJPEG_INSTALL_SUBDIR}")
-endif(NOT OPENJPEG_INSTALL_DOC_DIR)
+endif()
if(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
# We could install *.cmake files in share/ however those files contains
# hardcoded path to libraries on a multi-arch system (fedora/debian) those
# path will be different (lib/i386-linux-gnu vs lib/x86_64-linux-gnu)
set(OPENJPEG_INSTALL_PACKAGE_DIR "${OPENJPEG_INSTALL_LIB_DIR}/${OPENJPEG_INSTALL_SUBDIR}")
-endif(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
+endif()
#-----------------------------------------------------------------------------
# Big endian test:
@@ -141,7 +141,7 @@ set(MANGLE_PREFIX ${OPENJPEG_LIBRARY_NAME})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/openjpeg_mangle.h.in
${CMAKE_CURRENT_BINARY_DIR}/openjpeg_mangle.h
@ONLY)
-endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/openjpeg_mangle.h.in)
+endif()
#-----------------------------------------------------------------------------
# pkgconfig support
@@ -154,7 +154,7 @@ if(UNIX)
install( CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
\"libopenjpeg1.pc\"
\"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_SHARE_DIR}/pkgconfig/libopenjpeg.pc\")")
-endif(UNIX)
+endif()
#-----------------------------------------------------------------------------
# Compiler specific flags:
@@ -163,7 +163,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
# set(CMAKE_C_FLAGS "-Wall -std=c99 ${CMAKE_C_FLAGS}") # FIXME: this setting prevented us from setting a coverage build.
# Do not use ffast-math for all build, it would produce incorrect results, only set for release:
set(CMAKE_C_FLAGS_RELEASE "-ffast-math ${CMAKE_C_FLAGS_RELEASE}")
-endif(CMAKE_COMPILER_IS_GNUCC)
+endif()
#-----------------------------------------------------------------------------
# opj_config.h generation (1/2)
@@ -195,7 +195,7 @@ option(BUILD_JPWL "Build the JPWL library and executables" OFF)
option(BUILD_JPIP "Build the JPIP library and executables." OFF)
if(BUILD_JPIP)
option(BUILD_JPIP_SERVER "Build the JPIP server." OFF)
-endif(BUILD_JPIP)
+endif()
option(BUILD_VIEWER "Build the OPJViewer executable (C++)" OFF)
option(BUILD_JAVA "Build the openjpeg jar (Java)" OFF)
mark_as_advanced(BUILD_VIEWER)
@@ -207,7 +207,7 @@ if(BUILD_CODEC OR BUILD_MJ2)
option(BUILD_THIRDPARTY "Build the thirdparty executables if it is needed" OFF)
add_subdirectory(thirdparty)
add_subdirectory(applications)
-endif (BUILD_CODEC OR BUILD_MJ2)
+endif ()
include(CheckTypeSize)
CHECK_TYPE_SIZE(ssize_t SSIZE_T)
@@ -226,7 +226,7 @@ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opj_config.h
option(BUILD_DOC "Build the HTML documentation (with doxygen if available)." OFF)
if(BUILD_DOC)
add_subdirectory(doc)
-endif(BUILD_DOC)
+endif()
#-----------------------------------------------------------------------------
# Buld Testing
@@ -235,10 +235,10 @@ if(BUILD_TESTING)
if(BUILD_CODEC)
enable_testing()
include(CTest)
-
+
# Search openjpeg data needed for the tests
# They could be found via svn on the OpenJPEG google code project
- # svn checkout http://openjpeg.googlecode.com/svn/data (about 70 Mo)
+ # svn checkout http://openjpeg.googlecode.com/svn/data (about 70 Mo)
find_path(OPJ_DATA_ROOT README-OPJ-Data
PATHS
$ENV{OPJ_DATA_ROOT}
@@ -247,11 +247,11 @@ if(BUILD_TESTING)
# Add repository where to find tests
add_subdirectory(tests)
-
- else(BUILD_CODEC)
+
+ else()
message(FATAL_ERROR "You need build codec to run the tests")
- endif(BUILD_CODEC)
-endif(BUILD_TESTING)
+ endif()
+endif()
#-----------------------------------------------------------------------------
# install all targets referenced as OPENJPEGTargets
@@ -268,7 +268,7 @@ install( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
# install CHANGES and LICENSE
if(EXISTS ${OPENJPEG_SOURCE_DIR}/CHANGES)
install(FILES CHANGES DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
-endif(EXISTS ${OPENJPEG_SOURCE_DIR}/CHANGES)
+endif()
install(FILES LICENSE DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
include (CMake/OpenJPEGCPack.cmake)