mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-09-15 10:21:10 -04:00
Syntax highlight cmake code as well
This commit is contained in:
parent
4daba0efa8
commit
325dc8abf4
16
README.md
16
README.md
@ -167,19 +167,23 @@ still recommended).
|
|||||||
Just place the library into dedicated directory in your project
|
Just place the library into dedicated directory in your project
|
||||||
(for example, extlib/libSDL2pp) and add
|
(for example, extlib/libSDL2pp) and add
|
||||||
|
|
||||||
SET(SDL2PP_WITH_IMAGE ON) # if you need SDL_image support
|
```cmake
|
||||||
SET(SDL2PP_WITH_TTF ON) # if you need SDL_ttf support
|
SET(SDL2PP_WITH_IMAGE ON) # if you need SDL_image support
|
||||||
ADD_SUBDIRECTORY(extlib/libSDL2pp)
|
SET(SDL2PP_WITH_TTF ON) # if you need SDL_ttf support
|
||||||
|
ADD_SUBDIRECTORY(extlib/libSDL2pp)
|
||||||
|
```
|
||||||
|
|
||||||
into your core CMakeLists.txt. This will act as similar to what
|
into your core CMakeLists.txt. This will act as similar to what
|
||||||
FIND_PACKAGE usually does, and will provide ${SDL2PP_INCLUDE_DIRS}
|
FIND_PACKAGE usually does, and will provide ${SDL2PP_INCLUDE_DIRS}
|
||||||
and ${SDL2PP_LIBRARIES} variables for your project. You will then
|
and ${SDL2PP_LIBRARIES} variables for your project. You will then
|
||||||
be able to use them as usual:
|
be able to use them as usual:
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${SDL2PP_INCLUDE_DIRS})
|
```cmake
|
||||||
|
INCLUDE_DIRECTORIES(${SDL2PP_INCLUDE_DIRS})
|
||||||
|
|
||||||
ADD_EXECUTABLE(mytarget ...)
|
ADD_EXECUTABLE(mytarget ...)
|
||||||
TARGET_LINK_LIBRARIES(mytarget ${SDL2PP_LIBRARIES})
|
TARGET_LINK_LIBRARIES(mytarget ${SDL2PP_LIBRARIES})
|
||||||
|
```
|
||||||
|
|
||||||
if bundled, libSDL2pp does not build examples and becomes a static
|
if bundled, libSDL2pp does not build examples and becomes a static
|
||||||
library, providing required SDL2 includes/libs in the mentioned
|
library, providing required SDL2 includes/libs in the mentioned
|
||||||
|
Loading…
x
Reference in New Issue
Block a user