Fixed Cflags variable in pkgconfig file.
authorBoris Pek <tehnick-8@yandex.ru>
Sat, 22 Apr 2017 20:05:06 +0000 (20:05 +0000)
committerDiederick Niehorster <dcnieho@gmail.com>
Sat, 22 Apr 2017 20:05:06 +0000 (20:05 +0000)
(cherry picked from commit bc5471a2f8c9c0c7bcb5b767ee788e2b45ec33e9)

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1794 7f0cb862-5218-0410-a997-914c9d46530a

CMakeLists.txt

index 4d6e1f2..8569707 100644 (file)
@@ -580,6 +580,9 @@ SET(PC_FILENAME "${LIBNAME}.pc")
 IF(FREEGLUT_GLES)
   SET(PC_CFLAGS "-DFREEGLUT_GLES")
 ENDIF()
+IF(FREEGLUT_BUILD_STATIC_LIBS)
+  LIST(APPEND PC_CFLAGS -DFREEGLUT_STATIC)
+ENDIF()
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/freeglut.pc.in ${CMAKE_BINARY_DIR}/freeglut.pc @ONLY)
 INSTALL(FILES ${CMAKE_BINARY_DIR}/freeglut.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ RENAME ${PC_FILENAME} COMPONENT Devel)
 # TODO: change the library and .pc name when building for GLES,