| 1 | ## Process this file with cmake |
|---|
| 2 | #==================================================================== |
|---|
| 3 | # NeXus - Neutron & X-ray Common Data Format |
|---|
| 4 | # |
|---|
| 5 | # CMakeLists for building the NeXus library and applications. |
|---|
| 6 | # |
|---|
| 7 | # Copyright (C) 2011 Stephen Rankin |
|---|
| 8 | # |
|---|
| 9 | # This library is free software; you can redistribute it and/or |
|---|
| 10 | # modify it under the terms of the GNU Lesser General Public |
|---|
| 11 | # License as published by the Free Software Foundation; either |
|---|
| 12 | # version 2 of the License, or (at your option) any later version. |
|---|
| 13 | # |
|---|
| 14 | # This library is distributed in the hope that it will be useful, |
|---|
| 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 17 | # Lesser General Public License for more details. |
|---|
| 18 | # |
|---|
| 19 | # You should have received a copy of the GNU Lesser General Public |
|---|
| 20 | # License along with this library; if not, write to the Free |
|---|
| 21 | # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
|---|
| 22 | # MA 02111-1307 USA |
|---|
| 23 | # |
|---|
| 24 | # For further information, see <http://www.nexusformat.org> |
|---|
| 25 | # |
|---|
| 26 | # |
|---|
| 27 | #==================================================================== |
|---|
| 28 | |
|---|
| 29 | #Make NeXus F90 Bindings Static Library |
|---|
| 30 | |
|---|
| 31 | set (SOURCES NXmodule.f90 NXUmodule.f90) |
|---|
| 32 | |
|---|
| 33 | add_library (NeXus_F90_Static_Library STATIC ${SOURCES}) |
|---|
| 34 | |
|---|
| 35 | set_target_properties(NeXus_F90_Static_Library PROPERTIES OUTPUT_NAME NeXus90) |
|---|
| 36 | |
|---|
| 37 | target_link_libraries(NeXus_F90_Static_Library NeXus_Static_Library ${HDF5_LIBRARIES} ${MXML_LINK} |
|---|
| 38 | ${HDF4_LINK} ${READLINE_LINK} ${M_LINK} ${DL_LINK} ${PTHREAD_LINK} ${DF_LINK} |
|---|
| 39 | ${TERMCAP_LINK} ${HISTORY_LINK} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES}) |
|---|
| 40 | |
|---|
| 41 | #Make NeXus F90 Bindings Shared Library |
|---|
| 42 | |
|---|
| 43 | add_library (NeXus_F90_Shared_Library SHARED ${SOURCES}) |
|---|
| 44 | |
|---|
| 45 | #Note - library version needs to be got from somewhere? |
|---|
| 46 | set_target_properties(NeXus_F90_Shared_Library PROPERTIES OUTPUT_NAME NeXus90 |
|---|
| 47 | VERSION 1.0 SOVERSION 4) |
|---|
| 48 | |
|---|
| 49 | target_link_libraries(NeXus_F90_Shared_Library NeXus_Shared_Library ${HDF5_LIBRARIES} ${MXML_LINK} |
|---|
| 50 | ${HDF4_LINK} ${READLINE_LINK} ${M_LINK} ${DL_LINK} ${PTHREAD_LINK} ${DF_LINK} |
|---|
| 51 | ${TERMCAP_LINK} ${HISTORY_LINK} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES}) |
|---|
| 52 | |
|---|
| 53 | install (TARGETS NeXus_F90_Static_Library NeXus_F90_Shared_Library |
|---|
| 54 | RUNTIME DESTINATION bin COMPONENT Runtime |
|---|
| 55 | LIBRARY DESTINATION lib COMPONENT Runtime |
|---|
| 56 | ARCHIVE DESTINATION lib/nexus COMPONENT Development) |
|---|