"Fossies" - the Fresh Open Source Software Archive

Member "udunits-2.2.28/prog/CMakeLists.txt" (7 Dec 2020, 736 Bytes) of package /linux/privat/udunits-2.2.28.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "CMakeLists.txt": 2.2.26_vs_2.2.28.

    1 include_directories ("${PROJECT_SOURCE_DIR}/lib")
    2 
    3 IF(BUILD_SHARED_LIBS AND MSVC)
    4  REMOVE_DEFINITIONS(-DDLL_EXPORT)
    5  REMOVE_DEFINITIONS(-DDLL_UDUNITS2)
    6 ENDIF()
    7 
    8 
    9 link_directories(${PROJECT_BINARY_DIR}/lib)
   10 
   11 set(udunits2_SRC udunits2.c)
   12 
   13 # We need to implement our own getopt if using Visual Studio.
   14 IF(MSVC)
   15    set(udunits2_SRC ${udunits2_SRC} XGetOpt.c XGetOpt.h)
   16 ENDIF()
   17 
   18 
   19 add_executable(udunits2 ${udunits2_SRC})
   20 
   21 target_link_libraries(udunits2 libudunits2)
   22 IF(MSVC)
   23     SET_TARGET_PROPERTIES(udunits2 PROPERTIES LINK_FLAGS_DEBUG
   24     " /NODEFAULTLIB:MSVCRT"
   25     )
   26 ENDIF()
   27 
   28 # The documentation is in multiple texinfo(5) format files
   29 texi_doc(udunits2prog.texi ${CMAKE_SOURCE_DIR}/COPYRIGHT)
   30 
   31 install(TARGETS udunits2 DESTINATION bin)