File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ if (ENABLE_MSAN AND ENABLE_ASAN)
4141 MESSAGE (WARNING "Compiling with both AddressSanitizer and MemorySanitizer is not recommended" )
4242endif ()
4343
44- add_subdirectory (src release )
44+ add_subdirectory (src )
4545
4646if (${BUILD_EXAMPLES} )
4747 add_subdirectory (examples )
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ if (raylib_USE_STATIC_LIBS)
1616 set (XPREFIX ${XPREFIX} _STATIC)
1717endif ()
1818
19- find_package (PkgConfig )
20- pkg_check_modules (${XPREFIX} REQUIRED raylib )
19+ find_package (PkgConfig QUIET )
20+ pkg_check_modules (${XPREFIX} QUIET raylib )
2121set (raylib_DEFINITIONS ${${XPREFIX} _CFLAGS})
2222
2323find_path (raylib_INCLUDE_DIR
@@ -26,7 +26,7 @@ find_path(raylib_INCLUDE_DIR
2626)
2727
2828find_library (raylib_LIBRARY
29- NAMES raylib
29+ NAMES raylib raylib_static
3030 HINTS ${${XPREFIX}_LIBRARY_DIRS}
3131)
3232
Original file line number Diff line number Diff line change @@ -188,6 +188,11 @@ if(SHARED)
188188 PUBLIC ${GRAPHICS}
189189 )
190190
191+ target_compile_definitions (raylib
192+ PRIVATE $<BUILD_INTERFACE :BUILD_LIBTYPE_SHARED >
193+ INTERFACE $<INSTALL_INTERFACE :USE_LIBTYPE_SHARED >
194+ )
195+
191196 set (PKG_CONFIG_LIBS_EXTRA "" )
192197
193198 set_property (TARGET raylib PROPERTY POSITION_INDEPENDENT_CODE ON )
@@ -214,7 +219,9 @@ if(SHARED)
214219 if (WIN32 )
215220 install (
216221 TARGETS raylib
217- RUNTIME DESTINATION "lib"
222+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR} "
223+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR} "
224+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR} "
218225 PUBLIC_HEADER DESTINATION "include"
219226 )
220227 else ()
You can’t perform that action at this time.
0 commit comments