diff --git a/src/external/mud/CMakeLists.txt b/src/external/mud/CMakeLists.txt new file mode 100644 index 00000000..febd4f0a --- /dev/null +++ b/src/external/mud/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(src) diff --git a/src/external/mud/src/CMakeLists.txt b/src/external/mud/src/CMakeLists.txt new file mode 100644 index 00000000..8dda07a2 --- /dev/null +++ b/src/external/mud/src/CMakeLists.txt @@ -0,0 +1,39 @@ +# - mud library --------------------------------------------------------------- + +#--- create pkg-config info --------------------------------------------------- +set(prefix "${CMAKE_INSTALL_PREFIX}") +set(exec_prefix "\$\{prefix\}") +set(libdir "\$\{exec_prefix\}/lib") +set(includedir "\$\{prefix\}/include") +set(MUD_VERSION "1.0.0") +set(MUD_LIBRARY_NAME "mud") +configure_file("mud.pc.in" "mud.pc" @ONLY) + +#--- lib creation ------------------------------------------------------------- +add_library(mud SHARED + mud_all.c + mud.c + mud_encode.c + mud_friendly.c + mud_gen.c + mud_new.c + mud_tri_ti.c +) + +#--- set target properties, e.g. version -------------------------------------- +set_target_properties(mud + PROPERTIES + VERSION ${MUD_VERSION} +) + +#--- install mud solib -------------------------------------------------------- +install(TARGETS mud DESTINATION lib) + +#--- install mud header ------------------------------------------------------- +install(FILES mud.h DESTINATION include) + +#--- install pkg-config info -------------------------------------------------- +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/mud.pc + DESTINATION lib/pkgconfig +) diff --git a/src/external/nexus/CMakeLists.txt b/src/external/nexus/CMakeLists.txt new file mode 100644 index 00000000..592576ab --- /dev/null +++ b/src/external/nexus/CMakeLists.txt @@ -0,0 +1,43 @@ +# - PNeXus library ------------------------------------------------------------ + +include_directories(${NEXUS_INCLUDE_DIR}) # to get the nexus headers + +#--- create pkg-config info --------------------------------------------------- +set(prefix "${CMAKE_INSTALL_PREFIX}") +set(exec_prefix "\$\{prefix\}") +set(libdir "\$\{exec_prefix\}/lib") +set(includedir "\$\{prefix\}/include") +set(PNEXUS_VERSION "0.9.0") +set(PNEXUS_LIBRARY_NAME "PNeXus") +configure_file("PNeXus.pc.in" "PNeXus.pc" @ONLY) + +#--- lib creation ------------------------------------------------------------- +add_library(PNeXus SHARED + PNeXus.cpp +) + +#--- set target properties, e.g. version -------------------------------------- +set_target_properties(PNeXus + PROPERTIES + VERSION ${PNEXUS_VERSION} +) + +#--- make sure that the include directory is found ---------------------------- +target_include_directories( + PNeXus BEFORE PRIVATE $ +) + +#--- add library dependencies ------------------------------------------------- +target_link_libraries(PNeXus ${NEXUS_LIBRARY}) + +#--- install PNeXus solib ----------------------------------------------------- +install(TARGETS PNeXus DESTINATION lib) + +#--- install PNeXus header ---------------------------------------------------- +install(FILES PNeXus.h DESTINATION include) + +#--- install pkg-config info -------------------------------------------------- +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/PNeXus.pc + DESTINATION lib/pkgconfig +)