File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,11 @@ if(BUILD_SHARED_LIBS) # This block will now be skipped on MSVC
3131 OUTPUT_NAME "obuparse"
3232 VERSION ${PROJECT_VERSION }
3333 SOVERSION 1
34+ EXPORT_NAME "shared"
35+ )
36+ target_include_directories (obuparse_shared PUBLIC
37+ $<BUILD_INTERFACE :${CMAKE_CURRENT_SOURCE_DIR } >
38+ $<INSTALL_INTERFACE :include >
3439 )
3540 add_library (OBUParse::shared ALIAS obuparse_shared )
3641endif ()
@@ -43,6 +48,11 @@ if(BUILD_STATIC_LIBS)
4348 else ()
4449 set_target_properties (obuparse_static PROPERTIES OUTPUT_NAME "obuparse" )
4550 endif ()
51+ set_target_properties (obuparse_static PROPERTIES EXPORT_NAME "static" )
52+ target_include_directories (obuparse_static PUBLIC
53+ $<BUILD_INTERFACE :${CMAKE_CURRENT_SOURCE_DIR } >
54+ $<INSTALL_INTERFACE :include >
55+ )
4656 add_library (OBUParse::static ALIAS obuparse_static )
4757endif ()
4858
@@ -52,7 +62,7 @@ add_executable(obudump
5262 tools/json.c
5363)
5464# Always link the tool statically. This is now guaranteed to exist on all platforms.
55- target_link_libraries (obudump PRIVATE obuparse_static )
65+ target_link_libraries (obudump PRIVATE OBUParse::static )
5666target_include_directories (obudump PRIVATE ${CMAKE_CURRENT_SOURCE_DIR } )
5767
5868# --- Installation ---
You can’t perform that action at this time.
0 commit comments