@@ -58,6 +58,7 @@ string(TOLOWER ${LIB_TYPE} SEARCH_TYPE)
5858if (HYDROCHRONO_ENABLE_IRRLICHT)
5959 # If irrlicht is required chrono library must be compiled with irrlicht
6060 find_package (Chrono COMPONENTS Irrlicht CONFIG REQUIRED )
61+ add_compile_definitions (HYDROCHRONO_HAVE_IRRLICHT=1 )
6162else (HYDROCHRONO_ENABLE_IRRLICHT )
6263 find_package (Chrono CONFIG REQUIRED )
6364endif (HYDROCHRONO_ENABLE_IRRLICHT )
@@ -160,54 +161,47 @@ target_link_libraries(HydroChrono
160161# ====================
161162# Irrlicht GUI helper
162163# ====================
163- if(HYDROCHRONO_ENABLE_IRRLICHT)
164164
165- add_library(HydroChronoGUI)
165+ add_library(HydroChronoGUI)
166166
167- target_sources(
168- HydroChronoGUI
167+ target_sources(
168+ HydroChronoGUI
169169
170- PUBLIC
171- src/gui/guihelper.cpp
172- )
170+ PUBLIC
171+ src/gui/guihelper.cpp
172+ )
173173
174- target_compile_features(HydroChronoGUI PUBLIC cxx_std_17)
174+ target_compile_features(HydroChronoGUI PUBLIC cxx_std_17)
175175
176176
177- target_include_directories(
178- HydroChronoGUI
177+ target_include_directories(
178+ HydroChronoGUI
179179
180- PUBLIC
181-
180+ PUBLIC
182181 $<BUILD_INTERFACE :${PROJECT_SOURCE_DIR} /include >
183182 $<INSTALL_INTERFACE :include >
184- ${CHRONO_INCLUDE_DIRS}
185- )
183+ ${CHRONO_INCLUDE_DIRS}
184+ )
186185
187- target_compile_definitions(HydroChronoGUI
188- PUBLIC
189- CHRONO_DATA_DIR=\" ${CHRONO_DATA_DIR} \"
190- PRIVATE
191- HYDROCHRONO_HAVE_IRRLICHT=1
192- )
186+ if(HYDROCHRONO_ENABLE_IRRLICHT)
187+ endif(HYDROCHRONO_ENABLE_IRRLICHT)
193188
194- target_compile_options(HydroChronoGUI BEFORE
195- PUBLIC
196- ${CHRONO_CXX_FLAGS}
197- )
189+ target_compile_options(HydroChronoGUI BEFORE
190+ PUBLIC
191+ ${CHRONO_CXX_FLAGS}
192+ )
198193
199- target_link_options(HydroChronoGUI BEFORE
200- PUBLIC
201- ${CHRONO_LINKER_FLAGS}
202- )
194+ target_link_options(HydroChronoGUI BEFORE
195+ PUBLIC
196+ ${CHRONO_LINKER_FLAGS}
197+ )
203198
204- target_link_libraries(HydroChronoGUI
205- PRIVATE
206- ${CHRONO_LIBRARIES}
207- )
199+ target_link_libraries(HydroChronoGUI
200+ PRIVATE
201+ ${CHRONO_LIBRARIES}
202+ )
208203
209204
210- endif(HYDROCHRONO_ENABLE_IRRLICHT)
211205
212206# ====================
213207# DEMOS
0 commit comments