mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-14 08:07:17 +07:00
public cmake e2d variables (E2D_INCLUDE_DIRS and E2D_LIBRARIES)
This commit is contained in:
@@ -1,20 +1,6 @@
|
||||
function(add_e2d_sample NAME)
|
||||
set(SAMPLE_NAME sample_${NAME})
|
||||
|
||||
#
|
||||
# external
|
||||
#
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
if(APPLE)
|
||||
find_library(Cocoa Cocoa)
|
||||
find_library(IOKit IOKit)
|
||||
find_library(CoreVideo CoreVideo)
|
||||
find_library(Foundation Foundation)
|
||||
endif(APPLE)
|
||||
|
||||
#
|
||||
# sources
|
||||
#
|
||||
@@ -31,24 +17,10 @@ function(add_e2d_sample NAME)
|
||||
|
||||
add_executable(${SAMPLE_NAME}
|
||||
${SAMPLE_SOURCES})
|
||||
|
||||
target_include_directories(${SAMPLE_NAME}
|
||||
PRIVATE "../headers")
|
||||
|
||||
target_link_libraries(${SAMPLE_NAME}
|
||||
enduro2d
|
||||
glfw
|
||||
${OPENGL_gl_LIBRARY}
|
||||
${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
if(APPLE)
|
||||
target_link_libraries(${SAMPLE_NAME}
|
||||
${Cocoa}
|
||||
${IOKit}
|
||||
${CoreVideo}
|
||||
${Foundation})
|
||||
endif(APPLE)
|
||||
|
||||
${E2D_LIBRARIES})
|
||||
target_include_directories(${SAMPLE_NAME}
|
||||
PRIVATE ${E2D_INCLUDE_DIRS})
|
||||
set_target_properties(${SAMPLE_NAME} PROPERTIES
|
||||
CXX_STANDARD 14
|
||||
CXX_STANDARD_REQUIRED YES
|
||||
|
||||
Reference in New Issue
Block a user