-
-
Save roxlu/a01cb0531cf51c4ca287 to your computer and use it in GitHub Desktop.
Example showing how to link with a custom dylib in your project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.8) | |
include(${CMAKE_CURRENT_LIST_DIR}/../../../../../lib/build/cmake/CMakeLists.txt) # roxlu cmake | |
include(${CMAKE_CURRENT_LIST_DIR}/../../shift/CMakeLists.txt) # shift | |
get_filename_component(app_path ${CMAKE_CURRENT_LIST_DIR}/../../ REALPATH) # get the directory name | |
get_filename_component(app_name ${app_path} NAME) # set directory name as application name | |
roxlu_enable_opengl() | |
roxlu_app_initialize(${app_name}) | |
# --------------------------------------------- | |
roxlu_app_add_source_file(main.cpp) | |
roxlu_app_add_source_file(Simulation.cpp) | |
roxlu_add_dylib(${CMAKE_BINARY_DIR}/libshift.dylib) | |
# --------------------------------------------- | |
roxlu_install_app() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.8) | |
include(${CMAKE_CURRENT_LIST_DIR}/../../../../lib/build/cmake/CMakeLists.txt) # roxlu cmake | |
set(bd ${CMAKE_CURRENT_LIST_DIR}/) | |
set(sd ${bd}/src/) | |
set(id ${bd}/include/) | |
include_directories(${id}) | |
set(src | |
${sd}Shift.cpp | |
) | |
add_library(shift SHARED ${src} ${roxlu_lib_source_files}) | |
target_link_libraries(shift ${roxlu_libs}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment