mirror of
https://github.com/lubosz/overte.git
synced 2025-04-09 07:22:31 +02:00
A simpler way to add the NSIGHT_FOUND define to all the projects depending on GPU
This commit is contained in:
parent
8c96096a67
commit
9601e09ba9
2 changed files with 5 additions and 11 deletions
|
@ -221,14 +221,8 @@ else (APPLE)
|
|||
|
||||
# link target to external libraries
|
||||
if (WIN32)
|
||||
# target_link_libraries(${TARGET_NAME} wsock32.lib Winmm.lib)
|
||||
target_link_libraries(${TARGET_NAME} wsock32.lib Winmm.lib)
|
||||
|
||||
if (USE_NSIGHT)
|
||||
# If required NSIGHT lib comes from gpu lib but still to add a precroc define
|
||||
if (NSIGHT_FOUND)
|
||||
add_definitions(-DNSIGHT_FOUND)
|
||||
endif ()
|
||||
endif()
|
||||
else (WIN32)
|
||||
# Nothing else required on linux apparently
|
||||
endif()
|
||||
|
|
|
@ -21,10 +21,11 @@ elseif (WIN32)
|
|||
|
||||
if (USE_NSIGHT)
|
||||
# try to find the Nsight package and add it to the build if we find it
|
||||
# note that this will also enable NSIGHT profilers in all the projects linking gpu
|
||||
find_package(NSIGHT)
|
||||
if (NSIGHT_FOUND)
|
||||
target_include_directories(${TARGET_NAME} PUBLIC ${NSIGHT_INCLUDE_DIRS})
|
||||
add_definitions(-DNSIGHT_FOUND)
|
||||
target_compile_definitions(${TARGET_NAME} PUBLIC NSIGHT_FOUND)
|
||||
target_link_libraries(${TARGET_NAME} "${NSIGHT_LIBRARIES}")
|
||||
endif ()
|
||||
endif()
|
||||
|
@ -39,8 +40,7 @@ else ()
|
|||
if (${OPENGL_INCLUDE_DIR})
|
||||
include_directories(SYSTEM "${OPENGL_INCLUDE_DIR}")
|
||||
endif ()
|
||||
|
||||
|
||||
target_link_libraries(${TARGET_NAME} "${GLEW_LIBRARIES}" "${OPENGL_LIBRARY}")
|
||||
|
||||
# target_include_directories(${TARGET_NAME} PUBLIC ${OPENGL_INCLUDE_DIR})
|
||||
|
||||
endif (APPLE)
|
||||
|
|
Loading…
Reference in a new issue