Skip to content

Commit

Permalink
make MGIS CPM friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
thelfer committed Aug 28, 2024
1 parent 270c0ee commit 6bdae09
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ endif(enable-doxygen-doc OR enable-website)

# add a target to generate API documentation with Doxygen
if(enable-doxygen-doc)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/docs)
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/docs)
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
Expand Down Expand Up @@ -296,7 +296,7 @@ add_subdirectory(bindings)
if(MFrontGenericInterfaceSupportDevelopmentVersion)
set(CPACK_PACKAGE_VERSION_PATCH "${CMAKE_PROJECT_VERSION_PATCH}-dev")
endif()
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LGPL-3.0.txt")
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LGPL-3.0.txt")
set(CPACK_VERBATIM_VARIABLES YES)
if(NOT CPACK_SOURCE_GENERATOR)
set(CPACK_SOURCE_GENERATOR "TGZ")
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/docs/doxygen
OUTPUT_DIRECTORY = @PROJECT_BINARY_DIR@/docs/doxygen

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
Expand Down
2 changes: 1 addition & 1 deletion bindings/fortran/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mgis_library(MFrontGenericInterface-fortran
mgis_behaviour.f95
mgis_model.f95)
set_target_properties(MFrontGenericInterface-fortran
PROPERTIES Fortran_MODULE_DIRECTORY "${CMAKE_BINARY_DIR}/bindings/fortran/modules")
PROPERTIES Fortran_MODULE_DIRECTORY "${PROJECT_BINARY_DIR}/bindings/fortran/modules")
target_include_directories(MFrontGenericInterface-fortran
PRIVATE "${PROJECT_SOURCE_DIR}/include"
PRIVATE "${PROJECT_SOURCE_DIR}/bindings/c/include")
Expand Down
4 changes: 2 additions & 2 deletions bindings/fortran/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ add_library(MFrontGenericInterfaceFortranUnitTestingUtilities
mgis_testing_utilities.f95
mgis_testing_utilities.c)
target_include_directories(MFrontGenericInterfaceFortranUnitTestingUtilities
PRIVATE "${CMAKE_BINARY_DIR}/bindings/fortran/modules")
PRIVATE "${PROJECT_BINARY_DIR}/bindings/fortran/modules")
target_link_libraries(MFrontGenericInterfaceFortranUnitTestingUtilities
PRIVATE MFrontGenericInterface-fortran)

function(test_fortran_bindings test)
add_executable(${test}_f
EXCLUDE_FROM_ALL ${test}.f95)
target_include_directories(${test}_f
PRIVATE "${CMAKE_BINARY_DIR}/bindings/fortran/modules")
PRIVATE "${PROJECT_BINARY_DIR}/bindings/fortran/modules")
target_link_libraries(${test}_f
PRIVATE MFrontGenericInterface-fortran MFrontGenericInterfaceFortranUnitTestingUtilities)
if(CMAKE_CONFIGURATION_TYPES)
Expand Down

0 comments on commit 6bdae09

Please sign in to comment.