File tree 2 files changed +10
-6
lines changed
2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,13 @@ csfml_set_option(BUILD_SHARED_LIBS TRUE BOOL "TRUE to build CSFML as shared libr
34
34
csfml_set_option(CSFML_BUILD_DOC FALSE BOOL "TRUE to generate the API documentation, FALSE to ignore it" )
35
35
36
36
# add an option for linking to sfml either statically or dynamically
37
- csfml_set_option(CSFML_LINK_SFML_STATICALLY TRUE BOOL "TRUE to link to a static version of SFML, FALSE to link dynamically" )
37
+ # default on windows to static and on other platforms to dynamic
38
+ if (SFML_OS_WINDOWS)
39
+ set (LINK_STATICALLY_DEFAULT TRUE )
40
+ else ()
41
+ set (LINK_STATICALLY_DEFAULT FALSE )
42
+ endif ()
43
+ csfml_set_option(CSFML_LINK_SFML_STATICALLY ${LINK_STATICALLY_DEFAULT} BOOL "TRUE to link to a static version of SFML, FALSE to link dynamically" )
38
44
39
45
# disable the rpath stuff
40
46
set (CMAKE_SKIP_BUILD_RPATH TRUE )
Original file line number Diff line number Diff line change @@ -17,11 +17,9 @@ if(SFML_COMPILER_MSVC)
17
17
endif ()
18
18
19
19
# find SFML libraries (C++)
20
- if (SFML_OS_WINDOWS)
21
- if (CSFML_LINK_SFML_STATICALLY)
22
- set (SFML_STATIC_LIBRARIES TRUE )
23
- add_definitions (-DSFML_STATIC)
24
- endif ()
20
+ if (CSFML_LINK_SFML_STATICALLY)
21
+ set (SFML_STATIC_LIBRARIES TRUE )
22
+ add_definitions (-DSFML_STATIC)
25
23
endif ()
26
24
find_package (SFML 2 COMPONENTS network graphics audio REQUIRED)
27
25
You can’t perform that action at this time.
0 commit comments