-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BUILD_STATIC option to create static libraries #74
Conversation
9a8f735
to
95d2f4c
Compare
This should use option BUILD_SHARED_LIBS instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After those changes I recommend using generate_export_header otherwise having the exports right for Windows requires lots of manual updates to ifdefs
@@ -76,6 +79,13 @@ else() | |||
option(BUILD_TESTS "Build the test harness" ON) | |||
endif() | |||
option(BUILD_QT6 "Build against Qt 6" OFF) | |||
option(BUILD_STATIC "Build statically" OFF) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
option(BUILD_SHARED_LIBS "Build in shared lib mode" ON)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That make sense, but I've been following the same policies used in the other KD* repository that I'm currently packaging for vcpkg, I don't know why BUILD_SHARED_LIBS isn't used anywhere else...
@@ -76,6 +79,13 @@ else() | |||
option(BUILD_TESTS "Build the test harness" ON) | |||
endif() | |||
option(BUILD_QT6 "Build against Qt 6" OFF) | |||
option(BUILD_STATIC "Build statically" OFF) | |||
|
|||
if(BUILD_STATIC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then get rid of
@@ -77,7 +77,7 @@ if(GRAPHVIZ_FOUND) | |||
endif() | |||
endif() | |||
|
|||
add_library(kdstatemachineeditor_core SHARED ${LIB_SRCS}) | |||
add_library(kdstatemachineeditor_core ${BUILD_LIBRARY_MODE} ${LIB_SRCS}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also not needed here just add_library(kdstatemachineeditor_core ${LIB_SRCS})
No description provided.