Fix header usage in MSVS build
This commit is contained in:
parent
bfe92f50f9
commit
4219b79ed8
1 changed files with 16 additions and 6 deletions
|
@ -77,13 +77,23 @@ target_link_libraries(TrianglesLib PUBLIC
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(TrianglesLib PUBLIC
|
if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
|
||||||
|
target_include_directories(TrianglesLib PUBLIC
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
|
${SFML_INCLUDE_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/third_party/imgui # imgui related headers
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/third_party/imgui-sfml # imgui-sfml related headers
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
target_include_directories(TrianglesLib PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src
|
${CMAKE_CURRENT_SOURCE_DIR}/src
|
||||||
${SFML_INCLUDE_DIR}
|
${SFML_INCLUDE_DIR}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/build_include # imgui related headers
|
${CMAKE_CURRENT_SOURCE_DIR}/build_include # imgui related headers
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Use macro to override imgui config header
|
# Use macro to override imgui config header
|
||||||
target_compile_definitions(TrianglesLib PRIVATE
|
target_compile_definitions(TrianglesLib PUBLIC
|
||||||
"IMGUI_USER_CONFIG=\"${CMAKE_CURRENT_SOURCE_DIR}/third_party/imgui-sfml/imconfig-SFML.h\"")
|
"IMGUI_USER_CONFIG=\"${CMAKE_CURRENT_SOURCE_DIR}/third_party/imgui-sfml/imconfig-SFML.h\"")
|
||||||
|
|
||||||
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
if(CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||||
|
|
Loading…
Reference in a new issue