## Copyright 2009-2016 Inria ## ## This file is part of the PaMPA software package for parallel ## mesh partitioning and adaptation. ## ## PaMPA is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## any later version. ## ## PaMPA is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## In this respect, the user's attention is drawn to the risks associated ## with loading, using, modifying and/or developing or reproducing the ## software by the user in light of its specific status of free software, ## that may mean that it is complicated to manipulate, and that also ## therefore means that it is reserved for developers and experienced ## professionals having in-depth computer knowledge. Users are therefore ## encouraged to load and test the software's suitability as regards ## their requirements in conditions enabling the security of their ## systems and/or data to be ensured and, more generally, to use and ## operate it in the same conditions as regards security. ## ## The fact that you are presently reading this means that you have had ## knowledge of the GPLv3 license and that you accept its terms. ## ############################################################# ## ## \file CMakeLists.txt ## ## \authors Cedric Lachat ## ## ## \date Version 1.0: from: 31 May 2011 ## to: 22 Sep 2017 ## ############################################################# ######################## # libpampaers # ######################## include_directories (${PAMPA_SOURCE_DIR}/src/remeshers/common) include_directories (${PAMPA_SOURCE_DIR}/pampa/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR}/src/libpampa) # Generate pampaers.h ADD_CUSTOM_COMMAND(OUTPUT pampaers.h COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/library.h ${CMAKE_CURRENT_BINARY_DIR}/pampaers.h DEPENDS library.h) # Sources to build libpampaers SET(PAMPAERS_CPP_SOURCES library_mesh_induce_multiple.c library_mesh_induce_multiple.h #library_mesh_rebuild.c #library_mesh_rebuild.h ) ADD_LIBRARY( pampaers ${PAMPAERS_CPP_SOURCES}) # Add dependency on PaMPA TARGET_LINK_LIBRARIES(pampaers pampa ${PAMPA_LIBRARY}) # Do some copies after building libpampa #IF (OLD_CMAKE) # ADD_CUSTOM_COMMAND(TARGET pampaers POST_BUILD # COMMAND ${CMAKE_COMMAND} -E copy libpampaers.a ${PAMPA_SOURCE_DIR}/pampa/lib # COMMAND ${CMAKE_COMMAND} -E copy ${REMESHERS_LIBRARY} ${PAMPA_SOURCE_DIR}/pampa/lib # ) # # XXX est-ce encore utile ? # #if (PAMPAERS_SCOTCH) # # ADD_CUSTOM_COMMAND(TARGET pampaers POST_BUILD # # COMMAND ${CMAKE_COMMAND} -E copy ${SCOTCH_REMESHERS_LIBRARY} ${PAMPA_SOURCE_DIR}/pampa/lib # # ) # #endif () #ELSE (OLD_CMAKE) # ADD_CUSTOM_COMMAND(TARGET pampaers POST_BUILD ## COMMAND ${CMAKE_COMMAND} -E copy $ ${PAMPA_SOURCE_DIR}/pampa/lib # COMMAND ${CMAKE_COMMAND} -E echo ${REMESHERS_LIBRARY} # COMMAND ${CMAKE_COMMAND} -E copy ${REMESHERS_LIBRARY} ${PAMPA_SOURCE_DIR}/pampa/lib # ) # if (PAMPAERS_SCOTCH) # ADD_CUSTOM_COMMAND(TARGET pampaers POST_BUILD # COMMAND ${CMAKE_COMMAND} -E copy ${SCOTCH_REMESHERS_LIBRARY} ${PAMPA_SOURCE_DIR}/pampa/lib # ) # endif () #ENDIF (OLD_CMAKE) # Specify where libpampaers and include files will be installed if (BUILD_SHARED_LIBS) INSTALL(TARGETS pampaers LIBRARY DESTINATION lib) else () INSTALL(TARGETS pampaers ARCHIVE DESTINATION lib) endif () install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pampaers.h DESTINATION include)