-
Notifications
You must be signed in to change notification settings - Fork 214
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
[cmake] Export config properly #262
base: master
Are you sure you want to change the base?
Conversation
|
||
project(IFCPP) |
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.
I've merged this with previous project
. There's no reason to do this twice with different names.
|
||
ADD_DEFINITIONS(-DIFCQUERY_STATIC_LIB) | ||
ADD_DEFINITIONS(-DIFCQUERY_LIB) |
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.
-DIFCQUERY_LIB
is required for dynamic builds.
@@ -75,9 +74,14 @@ if (MSVC) | |||
set_source_files_properties(src/ifcpp/IFC4X3/TypeFactory.cpp PROPERTIES COMPILE_FLAGS /bigobj) | |||
endif() | |||
|
|||
add_library(IfcPlusPlus STATIC ${IFCPP_SOURCE_FILES}) | |||
add_library(IfcPlusPlus ${IFCPP_SOURCE_FILES}) |
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.
Default is STATIC unless BUILD_SHARED_LIBS
is ON
- no change of behavior here.
|
||
TARGET_INCLUDE_DIRECTORIES(IfcPlusPlus | ||
PUBLIC "$<INSTALL_INTERFACE:include;include/ifcpp/IFC4X3/include;include/ifcpp/external>" |
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.
This is required for proper INTERFACE_INCLUDE_DIRECTORIES
in exported cmake config.
RUNTIME DESTINATION bin | ||
LIBRARY DESTINATION bin |
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.
LIBRARY
and ARCHIVE
target should really be in lib
.
@ifcquery any feedback? |
Why not keep project(IfcPlusPlus) in the cmake file? I don't see why IFCPP is better... About the lib and bin directory. I have everything in "bin", so everything is in just one place, easy to keep clean or copy stuff to a zip file etc.. And a library file is binary too, so not wrong ;) |
There's no real difference between them except that the exported cmake config name has always been
I find it hard to remember any other project with this installation layout. Pretty much every other library uses |
No description provided.