Skip to content

Commit 7e91efa

Browse files
authored
Merge pull request #27 from schwicke/sharedlibs
Sharedlibs
2 parents f62203c + 654d126 commit 7e91efa

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

src/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ FIND_PACKAGE(XMU REQUIRED)
1010
FIND_PACKAGE(Motif REQUIRED)
1111
FIND_PACKAGE(GLEW)
1212
FIND_PACKAGE(epoxy)
13+
FIND_LIBRARY(MATH_LIBRARY m)
1314

1415
if (APPLE)
1516
set(CMAKE_C_COMPILER gcc)
@@ -109,7 +110,7 @@ if (USE_GLEW)
109110
${GLEW_LIBRARIES}
110111
${OPENGL_LIBRARIES}
111112
${GL2PS_LIBRARY}
112-
m
113+
${MATH_LIBRARY}
113114
)
114115
else()
115116
SET(PHIGS_LIBRARIES
@@ -124,7 +125,7 @@ else()
124125
${OPENGL_LIBRARIES}
125126
${Epoxy_LIBRARY}
126127
${GL2PS_LIBRARY}
127-
m
128+
${MATH_LIBRARY}
128129
)
129130
endif()
130131
message(STATUS "PHIGS: Linking with libraries ${PHIGS_LIBRARIES}")

src/libphigs/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,21 @@ if (APPLE)
163163
set_target_properties(phigs-shared PROPERTIES OUTPUT_NAME phigs LINK_FLAGS "-undefined dynamic_lookup -flat_namespace")
164164
else()
165165
set_target_properties(phigs-shared PROPERTIES OUTPUT_NAME phigs)
166+
target_link_libraries(phigs-shared ${X11_LIBRARIES})
167+
target_link_libraries(phigs-shared ${XLIBS})
168+
target_link_libraries(phigs-shared ${X11_Xaw_LIB})
169+
target_link_libraries(phigs-shared ${X11_Xt_LIB})
170+
target_link_libraries(phigs-shared ${MOTIF_LIBRARIES})
171+
target_link_libraries(phigs-shared ${OPENGL_LIBRARIES})
172+
target_link_libraries(phigs-shared ${XMU_LIBRARY})
173+
target_link_libraries(phigs-shared ${PNG_LIBRARY})
174+
if (USE_GLEW)
175+
target_link_libraries(phigs-shared ${GLEW_LIBRARIES})
176+
else()
177+
target_link_libraries(phigs-shared ${EPOXY_LIBRARIES})
178+
endif()
179+
target_link_libraries(phigs-shared ${GL2PS_LIBRARY})
180+
target_link_libraries(phigs-shared ${MATH_LIBRARY})
166181
endif()
167182

168183
INSTALL(TARGETS

0 commit comments

Comments
 (0)