@@ -88,19 +88,18 @@ find_package(Doxygen)
8888if (DOXYGEN_FOUND)
8989 configure_file (${CMAKE_CURRENT_SOURCE_DIR} /Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile @ONLY)
9090 add_custom_target (doc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR} /Doxyfile
91- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
92- COMMENT "Generating API documentation with Doxygen" VERBATIM )
91+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
92+ COMMENT "Generating API documentation with Doxygen" VERBATIM )
9393endif (DOXYGEN_FOUND)
9494
9595
9696########################################
9797# NIX
9898
9999### AUTO-GENERATED VERSION HEADER
100- configure_file (
100+ configure_file (
101101 "${PROJECT_SOURCE_DIR} /version.h.in"
102- "${PROJECT_BINARY_DIR} /include/nix/nixversion.hpp"
103- )
102+ "${PROJECT_BINARY_DIR} /include/nix/nixversion.hpp" )
104103include_directories ("${PROJECT_BINARY_DIR} /include" )
105104
106105### scan files
@@ -112,18 +111,6 @@ list(APPEND nix_INCLUDES "${PROJECT_BINARY_DIR}/include/nix/nixversion.hpp")
112111### BACKENDS
113112set (backends "hdf5" )
114113
115- option (BUILD_FS_BACKEND "Build filesystem backend" OFF )
116- if (BUILD_FS_BACKEND)
117- # Yaml-cpp
118- set (YAMLCPP_STATIC_LIBRARY FALSE )
119- find_package (YamlCpp REQUIRED)
120- include_directories (${YAMLCPP_INCLUDE_DIR} )
121- set (LINK_LIBS ${LINK_LIBS} ${YAMLCPP_LIBRARY} )
122-
123- list (APPEND backends "fs" )
124- add_definitions (-DENABLE_FS_BACKEND=1)
125- endif ()
126-
127114# This is for tests
128115include_directories (${CMAKE_SOURCE_DIR} /backend)
129116
@@ -150,8 +137,8 @@ target_link_libraries(nixio ${LINK_LIBS})
150137set_target_properties (nixio PROPERTIES POSITION_INDEPENDENT_CODE TRUE )
151138set_target_properties (nixio PROPERTIES COMPILE_FLAGS "-fPIC" )
152139set_target_properties (nixio PROPERTIES
153- VERSION ${VERSION_MAJOR} .${VERSION_MINOR} .${VERSION_PATCH}
154- SOVERSION ${VERSION_ABI} )
140+ VERSION ${VERSION_MAJOR} .${VERSION_MINOR} .${VERSION_PATCH}
141+ SOVERSION ${VERSION_ABI} )
155142
156143if (WIN32 )
157144 set_target_properties (nixio PROPERTIES COMPILE_FLAGS -DNIXEXPORT)
@@ -181,26 +168,10 @@ if(CLANG_CHECK)
181168
182169 add_custom_target (check COMMAND ${CLANG_CHECK} -p ${CMAKE_BINARY_DIR} ${nix_SOURCES}
183170 DEPENDS nixio
184- SOURCES ${nix_SOURCES} )
171+ SOURCES ${nix_SOURCES} )
185172endif ()
186173
187174
188- ########################################
189- # CLI
190-
191- file (GLOB NixCli_SOURCES "cli/*.cpp" )
192- file (GLOB NixCli_SOURCES "cli/modules/*.cpp" )
193- include_directories ("cli" )
194-
195- add_executable (nixio-tool cli/Cli.cpp ${NixCli_SOURCES} )
196- if (NOT WIN32 )
197- set_target_properties (nixio-tool PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations" )
198- endif ()
199- target_link_libraries (nixio-tool nixio)
200- set_target_properties (nixio-tool PROPERTIES INSTALL_RPATH "@loader_path/../lib" )
201- message (STATUS "CLI executable added" )
202-
203-
204175########################################
205176# Tests
206177
@@ -251,11 +222,10 @@ endif()
251222########################################
252223# Install
253224
254- install (TARGETS nixio nixio-tool
225+ install (TARGETS nixio
255226 LIBRARY DESTINATION ${LIB_INSTALL_DIR}
256227 ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
257- FRAMEWORK DESTINATION "/Library/Frameworks"
258- RUNTIME DESTINATION bin)
228+ FRAMEWORK DESTINATION "/Library/Frameworks" )
259229install (DIRECTORY include / DESTINATION ${INCLUDE_INSTALL_DIR} /nixio-1.0)
260230install (DIRECTORY ${CMAKE_BINARY_DIR} /include / DESTINATION ${INCLUDE_INSTALL_DIR} /nixio-1.0)
261231
@@ -309,37 +279,30 @@ set(CPACK_SOURCE_PACKAGE_FILE_NAME "nixio-${CPACK_PACKAGE_VERSION}"
309279set (CPACK_SOURCE_GENERATOR ${CPACK_GENERATOR} )
310280
311281if (WIN32 )
312-
313282 install (TARGETS nixio
314- ARCHIVE
315- DESTINATION lib
316- COMPONENT libraries)
283+ ARCHIVE
284+ DESTINATION lib
285+ COMPONENT libraries)
317286 file (GLOB NIX_LICENSE "LICENSE*" )
318287 install (FILES ${NIX_LICENSE}
319- DESTINATION ./
320- COMPONENT libraries)
321-
322- if (NOT BUILD_STATIC)
323- file (GLOB HDF5_DLLS "${HDF5_DIR} /../../bin/*.dll" )
324- install (FILES ${HDF5_DLLS}
325- DESTINATION bin
326- COMPONENT libraries)
327- endif ()
288+ DESTINATION ./
289+ COMPONENT libraries)
290+
291+ if (NOT BUILD_STATIC)
292+ file (GLOB HDF5_DLLS "${HDF5_DIR} /../../bin/*.dll" )
293+ install (FILES ${HDF5_DLLS}
294+ DESTINATION bin
295+ COMPONENT libraries)
296+ endif ()
328297
329298 file (GLOB HDF5_COPYING "${HDF5_DIR} /../../COPYING" )
330299 install (FILES ${HDF5_COPYING}
331- DESTINATION ./
332- COMPONENT libraries)
333-
334- install (TARGETS nixio-tool
335- RUNTIME
336- DESTINATION bin
337- COMPONENT applications)
300+ DESTINATION ./
301+ COMPONENT libraries)
338302
339303 set (CPACK_GENERATOR NSIS)
340304 set (CPACK_NSIS_MODIFY_PATH ON )
341-
342- else ()
305+ else () # not WIN32
343306 if (NOT CPACK_GENERATOR)
344307 set (CPACK_GENERATOR TGZ)
345308 endif ()
@@ -360,7 +323,6 @@ MESSAGE(STATUS "CFLAGS: ${CMAKE_CXX_FLAGS}")
360323MESSAGE (STATUS "BOOST: ${Boost_LIBRARIES} " )
361324MESSAGE (STATUS "HDF5: ${HDF5_LIBRARIES} " )
362325MESSAGE (STATUS "CPPUNIT: ${CPPUNIT_LIBRARIES} " )
363- MESSAGE (STATUS "YAML-cpp: ${YAMLCPP_LIBRARY} " )
364326MESSAGE (STATUS "===============================" )
365327MESSAGE (STATUS "BACKENDS: ${backends} " )
366328MESSAGE (STATUS "===============================" )
0 commit comments