Adding CMake again :)
This commit is contained in:
parent
cb4274bb1c
commit
2dc8050ce3
10 changed files with 384 additions and 0 deletions
7
cmake/Macros.cmake
Normal file
7
cmake/Macros.cmake
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
function(spectre_example NAME)
|
||||
add_executable(example_${NAME} ${ARGN})
|
||||
target_link_libraries(example_${NAME} PRIVATE Spectre)
|
||||
set_target_properties(example_${NAME} PROPERTIES VS_GLOBAL_IgnoreImportLibrary "true")
|
||||
#set_target_properties(${NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
endfunction()
|
||||
31
cmake/SpectreConfig.cmake.in
Normal file
31
cmake/SpectreConfig.cmake.in
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# This script provides the spectre as an import target
|
||||
# ----------------------------------------------------------
|
||||
#
|
||||
# Use find_package() so cmake will find spectre:
|
||||
#
|
||||
# find_package(spectre) # No specific version
|
||||
# find_package(spectre REQUIRED) # No specific version, but the library must be found.
|
||||
# find_package(spectre 0.1) # any 0.1.x, but the library is optional.
|
||||
# find_package(spectre 0.1.0) # 0.1.0 or greater, but the library is optional.
|
||||
#
|
||||
# Then you just link your target with spectre:
|
||||
#
|
||||
# target_link_libraries( ${PROGRAM_EXE} PUBLIC spectre )
|
||||
#
|
||||
# if you do not specify REQUIRED. you must check the variable spectre_FOUND
|
||||
# and and only link to it if it's defined:
|
||||
#
|
||||
# if (spectre_FOUND)
|
||||
# ...
|
||||
# target_link_libraries( ${PROGRAM_EXE} PUBLIC spectre )
|
||||
# ..
|
||||
# endif()
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
find_package(OpenGL)
|
||||
|
||||
set_and_check( SPECTRE_ASSETS "@PACKAGE_ASSETS_DIR@" )
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SpectreTargets.cmake")
|
||||
check_required_components(Spectre)
|
||||
Loading…
Add table
Add a link
Reference in a new issue