Skip to content
Snippets Groups Projects
Commit 31c7e54e authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

prepare 1.4.2

parent 8932d5c6
No related branches found
No related tags found
No related merge requests found
Pipeline #6115 passed
......@@ -41,9 +41,9 @@ set(CMAKE_LEGACY_CYGWIN_WIN32 0)
# project()
if(DEFINED CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose build type")
else(DEFINED CMAKE_BUILD_TYPE)
else()
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose build type")
endif(DEFINED CMAKE_BUILD_TYPE)
endif()
project(gl2ps C)
......@@ -62,7 +62,7 @@ execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE DATE
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT DATE)
set(DATE "unknown")
endif(NOT DATE)
endif()
set(GL2PS_DATE "${DATE}")
if(APPLE)
......@@ -79,30 +79,29 @@ elseif(CYGWIN)
set(GMSH_OS "Windows")
set(WIN32 1)
add_definitions(-DWIN32)
endif(CXX_COMPILER_MACHINE MATCHES "mingw")
endif(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR
CMAKE_CXX_COMPILER_ID MATCHES "Clang")
else(APPLE)
endif()
endif()
else()
set(GL2PS_OS "${CMAKE_SYSTEM_NAME}")
endif(APPLE)
endif()
include(CheckFunctionExists)
check_function_exists(vsnprintf HAVE_VSNPRINTF)
if(NOT HAVE_VSNPRINTF)
add_definitions(-DHAVE_NO_VSNPRINTF)
endif(NOT HAVE_VSNPRINTF)
endif()
find_package(OpenGL)
if(OPENGL_FOUND)
list(APPEND EXTERNAL_INCLUDES ${OPENGL_INCLUDE_DIR})
list(APPEND EXTERNAL_LIBRARIES ${OPENGL_LIBRARIES})
endif(OPENGL_FOUND)
endif()
find_package(GLUT)
if(GLUT_FOUND)
list(APPEND EXTERNAL_INCLUDES ${GLUT_INCLUDE_DIR})
list(APPEND EXTERNAL_LIBRARIES ${GLUT_LIBRARIES})
endif(GLUT_FOUND)
endif()
if(ENABLE_ZLIB)
find_package(ZLIB)
......@@ -110,8 +109,8 @@ if(ENABLE_ZLIB)
add_definitions(-DHAVE_ZLIB)
list(APPEND EXTERNAL_INCLUDES ${ZLIB_INCLUDE_DIR})
list(APPEND EXTERNAL_LIBRARIES ${ZLIB_LIBRARIES})
endif(ZLIB_FOUND)
endif(ENABLE_ZLIB)
endif()
endif()
if(ENABLE_PNG)
find_package(PNG)
......@@ -119,16 +118,26 @@ if(ENABLE_PNG)
add_definitions(-DHAVE_PNG)
list(APPEND EXTERNAL_LIBRARIES ${PNG_LIBRARIES})
list(APPEND EXTERNAL_INCLUDES ${PNG_INCLUDE_DIR})
endif(PNG_FOUND)
endif(ENABLE_PNG)
endif()
endif()
find_library(MATH_LIBRARY m)
if(MATH_LIBRARY)
list(APPEND EXTERNAL_LIBRARIES ${MATH_LIBRARY})
endif(MATH_LIBRARY)
endif()
include_directories(${EXTERNAL_INCLUDES})
if(APPLE)
# OpenGL and GLUT are deprecated on macOS...
include(CheckCCompilerFlag)
check_c_compiler_flag("-Wdeprecated-declarations" DEPRECATED)
if(DEPRECATED)
set_source_files_properties(gl2ps.c gl2psTest.c gl2psTestSimple.c PROPERTIES
COMPILE_FLAGS "-Wno-deprecated-declarations")
endif()
endif()
if(OPENGL_FOUND)
add_library(lib STATIC gl2ps.c gl2ps.h)
set_target_properties(lib PROPERTIES OUTPUT_NAME gl2ps)
......@@ -139,21 +148,19 @@ if(OPENGL_FOUND)
VERSION ${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}.${GL2PS_PATCH_VERSION}
SOVERSION ${GL2PS_MAJOR_VERSION})
if(WIN32 OR CYGWIN)
# set_target_properties(shared PROPERTIES PREFIX "" IMPORT_PREFIX ""
# IMPORT_SUFFIX ".lib" COMPILE_FLAGS "-DGL2PSDLL -DGL2PSDLL_EXPORTS")
set_target_properties(shared PROPERTIES
COMPILE_FLAGS "-DGL2PSDLL -DGL2PSDLL_EXPORTS")
endif(WIN32 OR CYGWIN)
endif()
install(TARGETS lib shared RUNTIME DESTINATION bin
LIBRARY DESTINATION lib${LIB_SUFFIX}
ARCHIVE DESTINATION lib${LIB_SUFFIX})
endif(OPENGL_FOUND)
endif()
if(WIN32)
set(GL2PS_DOC .)
else(WIN32)
else()
set(GL2PS_DOC share/doc/gl2ps)
endif(WIN32)
endif()
install(FILES gl2ps.h DESTINATION include)
install(FILES ${CMAKE_SOURCE_DIR}/README.txt DESTINATION ${GL2PS_DOC})
......@@ -167,7 +174,7 @@ if(GLUT_FOUND)
target_link_libraries(gl2psTest lib ${EXTERNAL_LIBRARIES})
add_executable(gl2psTestSimple WIN32 gl2psTestSimple.c)
target_link_libraries(gl2psTestSimple lib ${EXTERNAL_LIBRARIES})
endif(GLUT_FOUND)
endif()
find_package(LATEX)
if(PDFLATEX_COMPILER)
......@@ -185,8 +192,8 @@ if(PDFLATEX_COMPILER)
${CMAKE_SOURCE_DIR}/gl2ps.tex ${CMAKE_BINARY_DIR}/gl2ps.tex
COMMAND ${TTH} ARGS -w1 gl2ps.tex)
add_custom_target(html DEPENDS gl2ps.html)
endif(TTH)
endif(PDFLATEX_COMPILER)
endif()
endif()
set(CPACK_PACKAGE_VENDOR "Christophe Geuzaine")
set(CPACK_PACKAGE_VERSION_MAJOR ${GL2PS_MAJOR_VERSION})
......@@ -198,10 +205,10 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
if(GL2PS_EXTRA_VERSION MATCHES "-git.*") # so that we'll overwrite the archives
set(CPACK_PACKAGE_FILE_NAME gl2ps-git-${GL2PS_OS})
set(CPACK_SOURCE_PACKAGE_FILE_NAME gl2ps-git)
else(GL2PS_EXTRA_VERSION MATCHES "-git.*")
else()
set(CPACK_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-${GL2PS_OS})
set(CPACK_SOURCE_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION})
endif(GL2PS_EXTRA_VERSION MATCHES "-git.*")
endif()
set(CPACK_PACKAGE_INSTALL_DIRECTORY "gl2ps")
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING.LGPL)
set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.txt)
......@@ -213,8 +220,8 @@ set(CPACK_SOURCE_IGNORE_FILES "TODO.txt" "${CMAKE_BINARY_DIR}" "/CVS/"
"/.svn" "/.git" "~$" "DS_Store$" "/tmp/" "/bin/" "/lib/")
if(WIN32)
set(CPACK_GENERATOR ZIP)
else(WIN32)
else()
set(CPACK_GENERATOR TGZ)
endif(WIN32)
endif()
include(CPack)
......@@ -91,7 +91,7 @@
</center>
<h2>Download</h2>
The latest stable version of GL2PS is <a
href="http://geuz.org/gl2ps/src/gl2ps-1.4.1.tgz">gl2ps-1.4.1.tgz</a>. Older
href="http://geuz.org/gl2ps/src/gl2ps-1.4.2.tgz">gl2ps-1.4.2.tgz</a>. Older
versions and source snapshots are available <a
href="http://geuz.org/gl2ps/src/">here</a>. For access to the Git repository use:
'<code>git clone <a href="http://gitlab.onelab.info/gl2ps/gl2ps.git"
......@@ -1125,6 +1125,8 @@ anymore.
algorithm on the fly; fix rotated text in PGF output; use \dd{pt} instead of
\dd{px} in SVG viewport; new \dd{GL2PS_NO_TEX_FONTSIZE} option and
\dd{gl2psSetTexScaling} function to control \LaTeX\ scaling.
\item[1.4.2] (Apr 7, 2020) Revert dynamic library naming change inadvertently
introduced in 1.4.1.
\end{description}
\end{document}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment