mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-22 22:55:06 +00:00
Add ".rc" files to each libraries and executables for Windows build
This commit is contained in:
parent
fd49b2baff
commit
c5c60068f7
@ -71,16 +71,22 @@ endif ()
|
||||
|
||||
include_directories (${GLEW_DIR}/include)
|
||||
|
||||
add_library (glew SHARED ${GLEW_DIR}/src/glew.c)
|
||||
set (GLEW_SRC_FILES ${GLEW_DIR}/src/glew.c)
|
||||
|
||||
if (WIN32)
|
||||
list (APPEND GLEW_SRC_FILES ${GLEW_DIR}/build/glew.rc)
|
||||
endif ()
|
||||
|
||||
add_library (glew SHARED ${GLEW_SRC_FILES})
|
||||
set_target_properties (glew PROPERTIES COMPILE_DEFINITIONS "GLEW_BUILD" OUTPUT_NAME "${GLEW_LIB_NAME}" PREFIX "${DLL_PREFIX}")
|
||||
add_library (glew_s STATIC ${GLEW_DIR}/src/glew.c)
|
||||
add_library (glew_s STATIC ${GLEW_SRC_FILES})
|
||||
set_target_properties (glew_s PROPERTIES COMPILE_DEFINITIONS "GLEW_STATIC" OUTPUT_NAME "${GLEW_LIB_NAME}" PREFIX lib)
|
||||
target_link_libraries (glew ${GLEW_LIBRARIES})
|
||||
target_link_libraries (glew_s ${GLEW_LIBRARIES})
|
||||
|
||||
add_library(glewmx SHARED ${GLEW_DIR}/src/glew.c )
|
||||
add_library(glewmx SHARED ${GLEW_SRC_FILES})
|
||||
set_target_properties (glewmx PROPERTIES COMPILE_DEFINITIONS "GLEW_BUILD;GLEW_MX" OUTPUT_NAME "${GLEW_LIB_NAME}mx" PREFIX "${DLL_PREFIX}")
|
||||
add_library(glewmx_s STATIC ${GLEW_DIR}/src/glew.c )
|
||||
add_library(glewmx_s STATIC ${GLEW_SRC_FILES})
|
||||
set_target_properties (glewmx_s PROPERTIES COMPILE_DEFINITIONS "GLEW_STATIC;GLEW_MX" OUTPUT_NAME "${GLEW_LIB_NAME}mx" PREFIX lib)
|
||||
target_link_libraries (glewmx ${GLEW_LIBRARIES})
|
||||
target_link_libraries (glewmx_s ${GLEW_LIBRARIES})
|
||||
@ -114,10 +120,18 @@ install ( TARGETS ${targets_to_install}
|
||||
)
|
||||
|
||||
if (BUILD_UTILS)
|
||||
add_executable (glewinfo ${GLEW_DIR}/src/glewinfo.c)
|
||||
set (GLEWINFO_SRC_FILES ${GLEW_DIR}/src/glewinfo.c)
|
||||
if (WIN32)
|
||||
list (APPEND GLEWINFO_SRC_FILES ${GLEW_DIR}/build/glewinfo.rc)
|
||||
endif ()
|
||||
add_executable (glewinfo ${GLEWINFO_SRC_FILES})
|
||||
target_link_libraries (glewinfo glew)
|
||||
|
||||
add_executable (visualinfo ${GLEW_DIR}/src/visualinfo.c)
|
||||
set (VISUALINFO_SRC_FILES ${GLEW_DIR}/src/visualinfo.c)
|
||||
if (WIN32)
|
||||
list (APPEND VISUALINFO_SRC_FILES ${GLEW_DIR}/build/visualinfo.rc)
|
||||
endif ()
|
||||
add_executable (visualinfo ${VISUALINFO_SRC_FILES})
|
||||
target_link_libraries (visualinfo glew)
|
||||
|
||||
install ( TARGETS glewinfo visualinfo
|
||||
|
Loading…
Reference in New Issue
Block a user