diff --git a/Applications/ApplicationsLib/CMakeLists.txt b/Applications/ApplicationsLib/CMakeLists.txt index e391d9c34a3f5fed4ac79c21d9736cb892dc8fd4..1bcaaede239171ca9b0c1c0de84a08c5dba0c339 100644 --- a/Applications/ApplicationsLib/CMakeLists.txt +++ b/Applications/ApplicationsLib/CMakeLists.txt @@ -4,7 +4,9 @@ set(LIB_SOURCES ${SOURCES_APPLICATIONSLIB}) # Library ogs_add_library(ApplicationsLib ${LIB_SOURCES}) - +if(USE_LIS) + target_compile_definitions(ApplicationsLib PUBLIC USE_LIS) +endif() target_link_libraries(ApplicationsLib PUBLIC BaseLib GeoLib NumLib Processes PRIVATE CMakeInfoLib diff --git a/CMakeLists.txt b/CMakeLists.txt index e55942b3026636f3f292f1cd54f68dbe29fcf058..f8fcd3ec0efc29f70d9a9246ff66a7d1aaefb6d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -186,7 +186,6 @@ option(OGS_USE_MFRONT OFF) # ---- Definitions ---- if(OGS_USE_LIS) - add_definitions(-DUSE_LIS) include_directories(SYSTEM ${LIS_INCLUDE_DIR}) set(OGS_USE_EIGEN ON) endif() diff --git a/MathLib/CMakeLists.txt b/MathLib/CMakeLists.txt index c5c74903922c5657a8b9d80e1e8e2bf68eb0c731..d25681ac9d61fe1d2f2e975a21e2fcb73d32a0ac 100644 --- a/MathLib/CMakeLists.txt +++ b/MathLib/CMakeLists.txt @@ -35,6 +35,9 @@ target_include_directories(MathLib ) set_target_properties(MathLib PROPERTIES LINKER_LANGUAGE CXX) +if(USE_LIS) + target_compile_definitions(MathLib PUBLIC USE_LIS) +endif() target_link_libraries(MathLib PUBLIC