summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRex Dieter <[email protected]>2015-06-04 10:12:39 -0500
committerRex Dieter <[email protected]>2015-06-04 10:12:39 -0500
commit5ca3c9d7d8d4fd4870f8c5b8d5df5de617be26b3 (patch)
treebc29765e58048ca10e0fdacb426fe7861ab05e94
parent3cccd6147306ba1979b9db92339c046f3db454f0 (diff)
fix/improve htmesh compiler flags
don't override CMAKE_CXX_FLAGS completely, only *add* -fexceptions use target property POSITION_INDEPENDENT_CODE instead of hard-coded -fPIC
-rw-r--r--kstars/htmesh/CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/kstars/htmesh/CMakeLists.txt b/kstars/htmesh/CMakeLists.txt
index db17de6..3c39ce4 100644
--- a/kstars/htmesh/CMakeLists.txt
+++ b/kstars/htmesh/CMakeLists.txt
@@ -25,8 +25,7 @@ set(HTMesh_LIB_SRCS
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
#TODO is there KF5_ENABLE_EXCEPTIONS?
-set (CMAKE_CXX_FLAGS "-fexceptions")
-#set (CMAKE_CXX_FLAGS "-fPIC") # If you wish to compile the HTMesh perl wrapper, uncomment this, rebuild and copy the library into /usr/lib/, because we will use it as a shared object. See README in th e perl wrapper directory (kstars/kstars/data/tools/HTMesh-*) for more details.
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
add_library(htmesh STATIC ${HTMesh_LIB_SRCS})
@@ -36,3 +35,7 @@ set_target_properties(htmesh PROPERTIES
VERSION 1.0.0
SOVERSION 1)
install(TARGETS htmesh ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
+
+# If you wish to compile the HTMesh perl wrapper, uncomment this, rebuild and copy the library into /usr/lib/, because we will use it as a shared object. See README in the perl wrapper directory (kstars/kstars/data/tools/HTMesh-*) for more details.
+#set_property(TARGET htmesh PROPERTY POSITION_INDEPENDENT_CODE YES)
+