File tree Expand file tree Collapse file tree 7 files changed +42
-30
lines changed Expand file tree Collapse file tree 7 files changed +42
-30
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.11 )
2
- project (raylib-aseprite
3
- VERSION 4.0.1
4
- DESCRIPTION "raylib-aseprite "
2
+ project (raylib_aseprite
3
+ VERSION 4.0.2
4
+ DESCRIPTION "raylib_aseprite: Use Aseprite files in raylib"
5
5
HOMEPAGE_URL "https://github.com/robloach/raylib-aseprite"
6
6
LANGUAGES C )
7
7
8
8
# Include Directory
9
9
add_subdirectory (include )
10
10
11
+ # Options
12
+ if ("${CMAKE_SOURCE_DIR} " STREQUAL "${CMAKE_CURRENT_SOURCE_DIR} " )
13
+ set (RAYLIB_ASEPRITE_IS_MAIN TRUE )
14
+ else ()
15
+ set (RAYLIB_ASEPRITE_IS_MAIN FALSE )
16
+ endif ()
17
+ option (RAYLIB_ASEPRITE_BUILD_EXAMPLES "Examples" ${RAYLIB_ASEPRITE_IS_MAIN} )
18
+
11
19
# Examples
12
- option (RAYLIB_ASEPRITE_BUILD_EXAMPLES "Build Examples" ON )
13
20
if (RAYLIB_ASEPRITE_BUILD_EXAMPLES )
14
21
add_subdirectory (examples )
15
- endif ()
16
22
17
- # Testing
18
- include (CTest )
19
- enable_testing ()
20
- if (BUILD_TESTING AND RAYLIB_ASEPRITE_BUILD_EXAMPLES )
21
- set (CTEST_CUSTOM_TESTS_IGNORE
22
- pkg-config--static
23
- )
24
- add_subdirectory (test )
23
+ # Testing
24
+ include (CTest )
25
+ enable_testing ()
26
+ if (BUILD_TESTING )
27
+ # set(CTEST_CUSTOM_TESTS_IGNORE
28
+ # pkg-config--static
29
+ # )
30
+ add_subdirectory (test )
31
+ endif ()
25
32
endif ()
Original file line number Diff line number Diff line change 1
1
# raylib
2
2
find_package (raylib QUIET )
3
3
if (NOT raylib_FOUND )
4
- set (BUILD_EXAMPLES OFF CACHE BOOL "" FORCE )
5
- set (BUILD_GAMES OFF CACHE BOOL "" FORCE )
6
- add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /../vendor/raylib ${CMAKE_CURRENT_SOURCE_DIR} /../vendor/raylib )
4
+ include (FetchContent )
5
+ FetchContent_Declare (
6
+ raylib
7
+ GIT_REPOSITORY https://github.com/raysan5/raylib.git
8
+ GIT_TAG 4.0.0
9
+ )
10
+ FetchContent_GetProperties (raylib )
11
+ if (NOT raylib_POPULATED ) # Have we downloaded raylib yet?
12
+ set (FETCHCONTENT_QUIET NO )
13
+ FetchContent_Populate (raylib )
14
+ set (BUILD_EXAMPLES OFF CACHE BOOL "" FORCE )
15
+ set (BUILD_GAMES OFF CACHE BOOL "" FORCE )
16
+ add_subdirectory (${raylib_SOURCE_DIR} ${raylib_BINARY_DIR} )
17
+ endif ()
7
18
endif ()
8
19
9
20
# raylib-aseprite-example
10
21
add_executable (raylib-aseprite-example raylib-aseprite-example.c )
11
22
target_link_libraries (raylib-aseprite-example PUBLIC
12
23
raylib
13
- raylib-aseprite
24
+ raylib_aseprite
14
25
)
26
+ set_property (TARGET raylib-aseprite-example PROPERTY C_STANDARD 99 )
15
27
16
28
# raylib-aseprite-numbers
17
29
add_executable (raylib-aseprite-numbers raylib-aseprite-numbers.c )
18
30
target_link_libraries (raylib-aseprite-numbers PUBLIC
19
31
raylib
20
- raylib-aseprite
32
+ raylib_aseprite
21
33
)
34
+ set_property (TARGET raylib-aseprite-numbers PROPERTY C_STANDARD 99 )
22
35
23
36
# Copy the resources
24
37
file (GLOB resources resources/* )
Original file line number Diff line number Diff line change 1
- add_library (raylib-aseprite INTERFACE )
1
+ add_library (raylib_aseprite INTERFACE )
2
2
3
3
# Include Directory
4
- target_include_directories (raylib-aseprite INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} / )
4
+ target_include_directories (raylib_aseprite INTERFACE ${CMAKE_CURRENT_SOURCE_DIR} / )
5
5
6
6
# Set the header files as install files.
7
7
install (FILES
Original file line number Diff line number Diff line change @@ -3,8 +3,9 @@ add_executable(raylib-aseprite-test raylib-aseprite-test.c)
3
3
target_compile_options (raylib-aseprite-test PRIVATE -Wall -Wextra -Wconversion -Wsign-conversion )
4
4
target_link_libraries (raylib-aseprite-test PUBLIC
5
5
raylib
6
- raylib-aseprite
6
+ raylib_aseprite
7
7
)
8
+ set_property (TARGET raylib-aseprite-test PROPERTY C_STANDARD 99 )
8
9
9
10
# Copy the resources
10
11
file (GLOB resources resources/* )
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments